Posts

Showing posts from September, 2012

WPF. Changing CheckBox IsChecked through MultiBinding doesn't triger CheckBox Command -

i have datagrid in wpf app view use check boxes in row headers. <datagrid.rowheadertemplate> <datatemplate> <grid > <checkbox borderthickness="0" command="{binding datacontext.assignpartstogroupcommand, relativesource={relativesource findancestor, ancestortype={x:type usercontrol}}}" > <checkbox.commandparameter> <multibinding converter="{staticresource partsgroupassignconverter}"> <binding path="ischecked" relativesource="{relativesource self}" mode="oneway"/> <binding relativesource="{relativesource mode=findancestor, ancestortype={x:type datagridrow}}"

many to many - Django Rest Framework ManyToMany filter multiple values -

i have 2 models, 1 defining users, other defining labels on these users. using django rest framework create api. able query users @ least labels ids 1 , 2. for instance users' labels are: [(1,2), (1,2,3), (2,3), (1,3)] want query return [(1,2), (1,2,3)] . so far, i've managed query users given label (let's id=1) doing: /api/users/?labels=1 , unable query users labels 1 , 2. i've tried /api/users/?labels=1,2 or /api/users/?labels=1&labels=2 return invalid users, i.e. users without labels 1 or 2... any welcome. thanks, dimitry github test repo: https://github.com/thedimlebowski/drf-m2m-filter code: models.py class label(models.model): name = models.charfield(max_length = 60) class user(models.model): labels = models.manytomanyfield(label) filters.py class userfilter(django_filters.filterset): labels = django_filters.filters.baseinfilter( name='labels', lookup_type='in', ) class meta:

Cannot run SAS EG scheduler through SAS app -

i have set schedule program (the 1 sas have developed themself) open sas eg , runs it, , working fine run on local server, if run through sas app fails. my question: know way can schedule sas eg running on sas app? if "schedule program" runs locally may need wrap sas code in rsubmit , endrsubmit statements ensure submitted remotely (on sasapp server). see documentation .

android - onReceive does'n work properly -

i have download manager downloads image on clicking button . of broadcast receivers this. below code: public void mydownloadmanager(){ receiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { string action = intent.getaction(); if (downloadmanager.action_download_complete.equals(action)) { downloadmanager.query query = new downloadmanager.query(); query.setfilterbyid(enqueue); cursor c = dm.query(query); if (c.movetofirst()) { int columnindex = c.getcolumnindex(downloadmanager.column_status); if (downloadmanager.status_successful == c.getint(columnindex)) { // download finished log.e("count downloads", "counting"); db.insertdownloadsrow

javascript - Animation Reverse not working - CSS3 -

i'm trying out on css3 animations. http://codepen.io/anon/pen/zpgobe?editors=0110 i add , remove class on image container , calling animation-direction: reverse; not working. edit: i'm toggling class open , close animation being calling on image tag namely animation keyframe name. what's happening is, when open class added, image pops animation being called. , when close class added, i'm calling animation: reverse; not working currently. below code i'm using. .image-container { height: 128px; width: 128px; position: absolute; top: 0; right: 0; bottom: 0; left: 0; margin: auto; img { border-radius: 50%; } &.open, &.close { img { -webkit-animation: animation; animation: animation; -webkit-animation-duration: 1s; animation-duration: 1s; -webkit-animation-fill-mode: both; animation-fill-mode: both;

sql server - Calling Stored Procedure in Access VBA only with the correct order of parameters, why? -

i have little problem executing stored procedure access. using "microsoft activex data objects 2.8 library" ms sql server 2008. for calling stored procedures this: set cmd = init_adodbcommand("sp_002_test_tabellenparameter") cmd.parameters("@str_test") = "test" cmd.parameters("@str_test2") = "test" cmd.execute i ok that, there issues if using nvarchar(max) variable in stored procedure using code, works fine too: set cmd = init_adodbcommand("sp_002_test_tabellenparameter") cmd.parameters.append cmd.createparameter("@str_test", adlongvarwchar, adparaminput, -1, "test") cmd.parameters.append cmd.createparameter("@str_test2", adlongvarwchar, adparaminput, -1, "test") cmd.execute it works too, if parameters in correct order, added in stored procedure on server. behaviour doesn't happen first option mentioned @ beginning! option can address parameter di

sql server - Relationship between collation and encoding -

does sql server enforce or control encoding of varchar columns in way? documentation i've browsed not make clear distinction collation (sort , compare rules) , encoding (byte representation of given character). i have sql server instance modern_spanish_ci_as (including database, tables , columns), got impression meant windows-1252 . database populated application uses windows-1252 well. recently, misconfigured application uses utf-8 has been writing data while and, surprise, sql server happily accepts complete unicode catalogue and, not that, other clients i've tried appear read data correctly no matter application table belongs to. when cast hex: select foo, cast(foo varbinary(max)) hex ...; ... see different encodings depending on application table belongs to: first app: €Á 0x80c1 second app: €Á 0xac20c100 ... raw characters display properly. how can sql clients know source encoding? edit: if both apps write same table find this: €Á

matplotlib support failed in PyCharm on OSX -

any idea how fix ? how can debug might problem ? not seem : https://youtrack.jetbrains.com/issue/py-15520 i in console: python 2.6.9 (unknown, jul 14 2015, 19:46:31) [gcc 4.2.1 compatible apple llvm 6.0 (clang-600.0.39)] on darwin >>> import matplotlib.pyplot plt matplotlib support failed the backend : >>> import matplotlib >>> print(matplotlib.rcparams['backend']) macosx

Deploy code in another directory - Jenkins -

i'm using jenkins deploy code , ci. don't have issues pulling code jenkins default workspace want deploy code specific sub directory apache run. location /var/wwww/. any command run in folder /var/www needs sudo access root own directoy. how can set jenkins run sudo permissions? you can add jenkins user (see systeminfo property user.name) /etc/sudoers file without password: your_user localhost = nopassword: but unsecure. prefer log in user , deploy files using publish on ssh plugin

mysql - Got error 'repetition-operator operand invalid' from regexp (Error #1139) -

i have column phone_number on database entry may contain more 1 phone number. plan identify entries not pass regex expression validation. this query using accomplish objective: select id, phone_number store phone_number not regexp '^\s*\(?(020[78]?\)? ?[1-9][0-9]{2,3} ?[0-9]{4})|(0[1-8][0-9]{3}\)? ?[1-9][0-9]{2} ?[0-9]{3})\s*$'; problem is, every time run code, error: error code: 1139. got error 'repetition-operator operand invalid' regexp thanks in advance. the regex using has @ least 2 issues: 1) escapes should doubled, , 2) there 2 groups separated | makes ^ , $ apply 2 branches separately. '^\s*\(?(020[78]?\)? ?[1-9][0-9]{2,3} ?[0-9]{4})|(0[1-8][0-9]{3}\)? ?[1-9][0-9]{2} ?[0-9]{3})\s*$' ^--------------------------------------^ ^------------------------------------------^ you can use '^[[:space:]]*\\(?(020[78]?\\)? ?[1-9][0-9]{2,3} ?[0-9]{4}|0[1-8][0-9]{3}\\)? ?[1-9][0-9]{2} ?[0-9]{3})[[:space:]]*$' breakdow

c# - Java call of .NET -

Image
i try use .net library in java. therefore, use jni calls of c++ project refers / uses dll of .net. to use .net library have several steps in-between. first use c# project ‘wrapper’ instance between library , c++ project. c# project creates dll. the main wrapper c# class (csharpwrappersession) [comvisible(true)] , has fixed guid [guid("xxx")] out of ‘c#’-dll create tlb file. tlb file imported c++ project. #import ".\csharpwrapper.net.tlb" no_namespace, named_guids when create exe out of c++ project can use wrapper , call needed .net library. now try make connection between c++ project java. therefore, use jni , created dll out of c++. leads error 0x80040154 – class not registered. this error happens, when try call cocreateinstance(clsid_csharpwrappersession) i have registered used libraries regasm , done gacutil on it. doing wrong? ideas or suggestions?

Ignore a block of code that fails c++ -

is there way ignore block of code if fails execute in c++? try - except in python, me lot. i'm trying make program reads information of file contains number, , converts integer stoi(). problem file being modified program, , @ point main program may read file when being modified, giving emty string , making program fail when trying convert integer. what make program ignore loop if stoi() fails, , wait until loop executed again actualized information. know can done in python try , eccept, don't know how in c++. try block associates 1 or more exception handlers (catch-clauses) compound statement. for more detail please refer try catch in c++

c# - Google API AndroidPublisher does not return reviews -

i'm using googles official .net library access reviews of app ( https://developers.google.com/android-publisher/api-ref/reviews/list corresponding api) "google.apis.androidpublisher.v2": "1.16.0.594" this (roughly) code: var credential = new serviceaccountcredential(new serviceaccountcredential.initializer("client_email_from_service_account_json" { scopes = new[] { androidpublisherservice.scope.androidpublisher } }.fromprivatekey("private_key_from_service_account_json")); var service = new androidpublisherservice(new baseclientservice.initializer { httpclientinitializer = credential, applicationname = "some_name", }); var request = service.reviews.list("my_app_id"); using (var reader = new streamreader(request.executeasstream())) { var json = reader.readtoend(); // json "{}\n" } var requestresult = await request.executeasync(); // requestresult.reviews null i same

Visual Studio 2015: Run tests using MSTest in a Multi Threaded Apartment -

i cannot find way mstest in visual studio 2015. how specify apartment state mta running tests? as per comment above in op's question, first need add test settings file. in solution explorer right click on project, add... -> new item... -> test settings / test settings. , file can used in menu: test -> test settings -> select test settings file open file using text editor , add / edit following value <execution> <executionthread apartmentstate="mta" /> </execution> your test settings file should this: <?xml version="1.0" encoding="utf-8"?> <testsettings id="ba23bf15-d0c7-48fc-b300-6f04c3fbe665" name="testsettings1" enabledefaultdatacollectors="false" xmlns="http://microsoft.com/schemas/visualstudio/teamtest/2010"> <description><!--_locid_text="description1"-->these default test settings local test run.</descript

ios - UISearchBar will not respond in UISplitviewController Master -

i have pretty standard setup of uitableview master controller in uisplitviewcontroller , universal ios9 app. again, standard fare, inserted uisearchbar header of table. self.searchcontroller = [[uisearchcontroller alloc] initwithsearchresultscontroller:nil]; self.searchcontroller.searchresultsupdater = self; self.searchcontroller.dimsbackgroundduringpresentation = no; self.searchcontroller.hidesnavigationbarduringpresentation = no; [self.searchcontroller.searchbar sizetofit]; self.tableview.tableheaderview = self.searchcontroller.searchbar; self.definespresentationcontext = yes; no need showing rest of code, search , work expected, on iphone . issue search bar not ever receive focus or present keyboard when run on ipad . no response, seems not receive touches. not respond programmatically attempting becomefirstresponder . nothing happens. the search bar visible , placed appropriately, there no underlay or overlay issues. it works fine on iphone . receives touch, pr

excel - Optimizing a date conversion loop -

i have set of data (n), 1500 items long filled dates in dd.mm.yyyy format excel not regognize. goal change them excel can work with, how it. function date_to_excel() call public_dims dim date_i string date_array = thisworkbook.sheets("spread").range(cells(7, 5), cells(7 + n, 5)) = 0 n date_i = thisworkbook.sheets("spread").cells(7 + i, 5) if date_i <> "" date_array = split(date_i, ".") date_i = date_array(1) & "/" & date_array(0) & "/" & date_array(2) thisworkbook.sheets("spread").cells(7 + i, 5) = date_i end if next end function the function works allright, takes long time. what askingfrom community ideas on how optimize loop. have tried adding entire range dates array , looking through that, doesn't seem compatible method of changing date format (the date_i = line near end). you can use text columns functionality dmy column format. thisworkbook

eclipse - Maven springMVC project. page not loading showing error page not found -

Image
i have created project maven in eclipse ide using springmvc . same project without maven running fine, after creating maven project not sure has gone wrong. project when run on server shows error page not found. codes as web.xml <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="webapp_id" version="3.0"> <display-name>loginmavenspringmvc</display-name> <servlet> <servlet-name>spring-dispatcher</servlet-name> <servlet-class> org.springframework.web.servlet.dispatcherservlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>spring-dispatcher</servlet-name> <url-pattern>/</url

wrapper - python decorate function call -

i learned decorators , wondered if it's possible use them not in function definition in function call, kind of general wrapper. the reason is, want call functions module through user-defined interface repeatable things function , don't want implement wrapper every single function. in principle have like def a(num): return num @double a(2) returning 4 without need of having access implementation of a . or in case global wrapper like def mutiply(factor,function,*args,**kwargs): return factor*function(*args,*kwargs) be better choice? there detailed section on decorators in marty alchin's book pro python apress. while new style @decorator syntax available used @ function definition, can use older syntax, same thing way: from module import myfunc myfunc = double_decorator(myfunc) x = myfunc(2) # returns 4

Jenkins : What is this changelog.mustache? -

i below exception every time run build on jenkins results in build failure. changelog.mustache file , can it? thanks. java.lang.runtimeexception: cannot find on classpath (changelog.mustache) or filesystem (/changelog.mustache). @ se.bjurr.gitchangelog.api.gitchangelogapi.gettemplatecontent(gitchangelogapi.java:417) @ se.bjurr.gitchangelog.api.gitchangelogapi.render(gitchangelogapi.java:365) @ org.jenkinsci.plugins.gitchangelog.perform.remotecallable.call(remotecallable.java:130) @ org.jenkinsci.plugins.gitchangelog.perform.remotecallable.call(remotecallable.java:29) @ hudson.filepath.act(filepath.java:1077) @ org.jenkinsci.plugins.gitchangelog.perform.gitchangelogperformer.performerperform(gitchangelogperformer.java:28) @ org.jenkinsci.plugins.gitchangelog.gitchangelogrecorder.perform(gitchangelogrecorder.java:44) @ hudson.tasks.buildstepmonitor$1.perform(buildstepmonitor.java:20) @ hudson.model.abstractbuild$abstractbuildexecution.perform(abs

php base64 iphone picture to webservice -

i need please , haven't found answers problem. i want take picture (or take gallery) on iphone/ipad , encode picture base64 string php , send base64 string webservice. if try on pc, alright. if want on ipad, seems nothing or incorrect base64 string send webservice have no idea why or so?! picture.php <form action="picture.php?action=upload" method="post" enctype="multipart/form-data"> <input type="file" name="datei" accept="capture=camcorder"> <br/><br/> <input type="submit" value="up"> </form> <? if(isset($_get['action'])) { $tmp_name = $_files["datei"]["tmp_name"]; $name = $_files["datei"]["name"]; $name = substr($name,0,-4); $name.="_".time().".jpg"; move_uploaded_file($tmp_name, "upload/".$name); $content = file_get_contents ( "upload/".

php - HTML - method POST in form does not send data in phpstorm -

this question has answer here: php: “notice: undefined variable”, “notice: undefined index”, , “notice: undefined offset” 22 answers i have issue form doesn't send data post method sends get method. here html code of form <form action="action.php" method="post"> <input type="text" name="text"> <input type="submit" value="send"> </form> and here php code in action page if($_server['request_method'] == 'post'){ echo $_post['text']; var_dump($_post); } if(isset($_post['text'])){ echo "ok"; }else{ echo "no"; } when submit form error output notice: undefined index: text in f:\test\action.php on line 9 array(0) { } no but when send data get method works correctly without problem. i think problem p

Add multidimensional array to html table in Powershell -

i have 2d array $dates 2 columns , multiple rows example: $dates[0][0] = 2016.07.20 $dates[0][1] = 1 $dates[1][0] = 2016.08.19 $dates[1][1] = 6 ... i need add array html output table. example have style of html table: $a = "<style>" $a = $a + "table{border-width: 2px;border-style: solid;border-color: black;border-collapse: collapse;}" $a = $a + "td{border-width: 1px;padding: 0px;border-style: solid;border-color: black;}" $a = $a + "</style>" when use: $dates | select @{expression={$_}}| convertto-html -head $a | out-file "c:\test.htm" i output, in same column: <tr><td>2016.07.20 1</td></tr> <tr><td>2016.08.19 6</td></tr> <tr><td>2016.08.20 6</td></tr> i need have values in different columns: <tr><td>2016.07.20</td><td>1</td></tr> <tr><td>2016.08.19</td><td>6</td><

sql server - SSRS line subgrouping by lines and not by columns -

Image
i want have row subgroup act head line details belonging each subgroup (see below) this i've done far add parent row group field libeldestinataire can see in picture this result have something wrong i'm unsure where. i've used table. i've tried matrix did not expected. any tips welcomed. create new tablix, right click details group, select add group / parent group , use settings: you tablix this: delete left column (created group). delete first row , use libeldestinataire field in selected cell. merge 3 cell next first cell , set other fields in next row: you this: in preview should this: apply color , formats want cells , desired result. let me know if helps.

c# - How to compile single c++ file programmatically using Microsoft.Build.Evaluation.Project -

i want compile single c++ file project in visual studio 2012 solution. similar ( using msbuild compile single cpp file ) using microsoft.build.evaluation.project for command line can use msbuild <projectfile> /v:q /p:configuration="<configuration>" /p:platform=x64 /t:clcompile /p:selectedfiles="<files separated semicolon>" i tried following code microsoft.build.evaluation.project project; string projfile = "c:\\projdir\\projectfile.vcxproj"; dictionary<string, string> props = new dictionary<string, string>(); props.add("configuration", "_64releasedi"); props.add("platform", "x64"); props.add("selectedfiles", "codefile.cpp"); project = new microsoft.build.evaluation.project(projfile, props, "4.0"); mycustombuildlogger logger = new mycustombuildlogger(); bool boutput = project.build(new string[] { "clcompile" }, new mycustombuildlogger[

javascript - Can not upload image from MAC or ubuntu from server in nodejs -

i trying upload image using multiparty in nodejs. working fine in local host having problem when uploading server. here code module.exports.uploadimg = function (req, res) { var form = new multiparty.form(); form.parse(req, function(err, fields, files) { if(err) console.log(err) cloudinary.uploader.upload(files.file[0].path,function(result) { res.send({ result:result, serverstatus:200, response_message:"image uploaded" }); }); }); } it working fine when uploading image windows showing timeout while uploading via mac or ubuntu. issue because of ec2 server settings. migrated code heroku server , working fine there.

angularjs - Highchart-ng change the chart type in drilldown -

i need change chart type after 1 level of drill down, drill down level must remain same. i looking similar http://jsfiddle.net/vealz/ highcharts-ng. specifically part emulates: $("#container").highcharts().series[0].update({ type: 'column' }); so far have been successful @ creating multi level drill down. each time try change chart type, drill-down resets

logging - How to tag the log messages with a request header in golang using logrus? -

i new golang, , need attaching http request header of go application in log entries http request.the request processed multiple packages/go files. use logrus package logging. have ton of code written already, nice change on global level instead of going each log entry. in java, use slf4j, , use feature called mdc; , looking similar.

c++ - How to insert an edit box into CMFCPropertyGridCtrl for password usage? -

i want insert edit box cmfcpropertygridctrl inputting password. cmfcpropertygridproperty can create normal edit box. how can create new 1 password usage ? derive new class cmfcpropertygridproperty , override 2 functions: ondrawvalue() , createinplaceedit() . the code prototype may this: void cmygridproperty::ondrawvalue(cdc* pdc, crect rect) { // pre-processing // ... cstring strval = formatproperty(); if(!strval.isempty()) { strval = _t("******"); // note: replace plain text "******" } rect.deflaterect(afx_text_margin, 0); pdc->drawtext(strval, rect, dt_left | dt_singleline | dt_vcenter | dt_noprefix | dt_end_ellipsis); // post-processing // ... } cwnd* cmygridproperty::createinplaceedit(crect rectedit, bool& bdefaultformat) { // pre-processing // ... cedit* pwndedit = new cedit; dword dwstyle = ws_visible | ws_child | es_autohscroll | es_password; // note: add 'es_

python - Module Import Error for Pypi module -

i trying import pypi module (thinkx 1.1.2) spyder. installed on anaconda , showing on conda list. python path folders anaconda folder. when attempt import thinkx spyder : import thinkx traceback (most recent call last): file "", line 1, in import thinkx importerror: no module named 'thinkx' according module readme , thinkx not expose package named thinkx . it provides following modules: thinkbayes : code think bayes. thinkstats2 : code think stats, 2nd edition thinkbayes2 : code think bayes, 2nd edition, not yet published. thinkdsp : code think dsp thinkplot : plotting code used in of books, wrapper functions matplotlib.pyplot try: import thinkbayes

Java Entity Manager - JSON reader was expecting a value but found 'db' -

i have code working: entitymanager entitymanager = getentitymanager(); entitymanager.gettransaction().begin(); string query = "db.band.find({})"; list<band> list = (list<band>) entitymanager.createnativequery(query, band.class).getresultlist(); entitymanager.close(); return list; it returns list no problem. want sort list date : entitymanager entitymanager = getentitymanager(); entitymanager.gettransaction().begin(); string query = "db.band.find({something__id:objectid(\"" + myid + "\")}).sort({\"somethingelse.date\":-1})"; list<band> list = (list<band>) entitymanager.createnativequery(query, band.class).getresultlist(); entitymanager.close(); return list; my console gives me message: org.bson.json.jsonparseexception: json reader expecting value found 'db' i checked string working in mongo console , did. ideas? edit: tried putting "something__id" between quotes because would

c# - How to get value from UserControl of Telerik RadGrid inside DataBound Event and Insert Event -

i'm using telerik grid, here i've placed usercontrol @ radgrid inside gridtemplatecolumn <telerik:gridtemplatecolumn uniquename="hardcoded" headertext="hardcoded" allowfiltering="true" datafield="accountdesc"> <itemtemplate> <asp:label id="hardcoded" runat="server" text='<%# bind("hardcoded") %>'></asp:label> </itemtemplate> <edititemtemplate> <userctrl:userctrl runat="server" id="lbl" /> </edititemtemplate> <insertitemtemplate> <userctrl:userctrl runat="server" id="lbl" /> </insertitemtemplate> </telerik:gridtemplatecolumn> here here usercontrol combo code <t

How can I deserialize a multilevel JavaScript object to an HTML form? -

edit : there 1 conceptual error , 1 technical error on problem definition question should better closed instead of sanitized. when have time redefine problem i'll post again. please voting close because of unspecific. there lots of info , questions serializing complex html forms corresponding javascript object (for example this ). here sample of process: having form <form> <input type="text" name="scalar" value="1"> <input type="text" name="array[0]" value="1"> <input type="text" name="array[1]" value="2"> <input type="text" name="array[2]" value="3"> <input type="text" name="object[subscalar]" value="1"> </form> and getting javascript object { "scalar": 1, "array": [1, 2, 3], "object": { "subscalar": 1 } }

javascript - Calculate a date in the future, skipping weekends and holidays, using JS/jQuery -

i trying script display 3 dates in future, estimating arrival time if customer orders today. in advertising , on homepage want show 4, 10 , 12 business days in future, formatted "monday, january 12th", allow customers know approximately when might labels. i able 3 dates in future, not accounting weekends or of dates in 'holiday date array,' i need count 4, 10, , 12 business days future., code shown below counting days without skipping weekends or holidays. what doing wrong? my current js / jquery code: var natdays = [ [1, 1, 'new year'], [1, 20, 'martin luther king'], [2, 17, 'washingtons birthday'], [5, 26, 'memorial day'], [7, 4, 'independence day'], [9, 12, 'labour day'], [10, 14, 'columbus day'], [11, 11, 'veterans day'], [11, 28, 'thanks giving day'], [12, 25, 'christmas'] ]; // datemin minimum delivery date var datemin = new date(); datemin.setdate(datemi

How to load all the images in the background of a RecyclerView in Android -

hi working on recycler view 1000 records, need display remote images. iam loading 20 records @ time. 6 records can shown @ time on screen (based on screen size of android device). recycler view making req backend image when row shown on screen, resulting in taking time display on screen (i using picasso library lazy loading). can please suggest me how cache 20 images in ground @ time, way can show image user when scrolls down. (this our requirement) i think link has need not 20 records first need implement linearlayoutmanager : public class precachinglayoutmanager extends linearlayoutmanager { private static final int default_extra_layout_space = 600; private int extralayoutspace = -1; private context context; public precachinglayoutmanager(context context) { super(context); this.context = context; } public precachinglayoutmanager(context context, int extralayoutspace) { super(context); this.context = context; this.extralayoutspace = extralayouts

java - New GUI builder from CodeNameOne introduces exception? -

i testing new gui builder , clicking new stuff gui, can't thru runtime exception: compiling 1 source file /home/peter/projekty/netbeans/cn1_testnewbuilder/testnewbuilder/build/tmp compiling 1 source file /home/peter/projekty/netbeans/cn1_testnewbuilder/testnewbuilder/build/classes compile: run: java.lang.classnotfoundexception: com.mycompany.myapp.myapplication @ java.net.urlclassloader.findclass(urlclassloader.java:381) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:331) @ java.lang.classloader.loadclass(classloader.java:357) @ java.lang.classloader.findsystemclass(classloader.java:1004) @ com.codename1.impl.javase.classpathloader.findclass(classpathloader.java:100) @ com.codename1.impl.javase.classpathloader.loadclass(classpathloader.java:50) @ java.lang.class.forname0(native method) @ java.lang.class.forname(class.java:264) @ com.codename1.impl.

windows 10 - Error Installing GitHub Desktop -

i have downloaded github desktop win 10 pro x64 github site. upon running installation error : "application cannot started, contact application vendor." i tried installing standlone verison : https://github-windows.s3.amazonaws.com/standalone/githubdesktop.exe but after extraction got folder github desktop,inside found setup.exe.running again shows same error. i tried downloading same ie,but no avail.i cleared %temp% folder also,but doesn't helps.disabled av while downloading , insatlling,still nothing helps!! %localappdata% doesn't has app folder,so cannot 2.0 things suggested in other threads(hidden files viewable). i pasting log error here: http://pastebin.com/frtnbthd have tried run administrator when installing? i've been reading log error , found reason may that. refers 0x80070005 error ( access denied ).

java - How do you configure Ant to get to run selections from the class? -

uhm... srry if there's strange how word things since it's first time asking in site this. there's still lot of things don't understand i'll best try , elaborate problem. new apache ant, tried following steps running basic program apache manual , configuring bit try of different code. basically, using ant compile , ant jar , , ant run works out fine. following build.xml setup provided, tried yes-no user input seemed turn out okay. build.xml <project> <target name="clean"> <delete dir="build"/> </target> <target name="compile"> <javac srcdir="src" destdir="classes" /> </target> <target name="jar"> <jar destfile="build/jar/circle.jar" basedir="classes"> <manifest> <attribute name="main-class" value="circle"/> </manifest>

Compare date time zone with time() in perl -

i trying compare file creation time in format: 08-07-2016 08:16:26 gmt current time using time() in perl. since time() returns epoch time, not sure how find time difference between these 2 different time formats. i tried below , obvious reasons, error saying: "argument 08-07-2016 08:16:26 gmt" isn't numeric in subtraction". my $current_time = time(); $time_diff = $creation_time - $current_time; if ($time_diff > 10) { #compare if difference greater 10hours # something... } some of questions have: since want compare hour difference, how can extract hours both these time formats? i unsure if comparison of $time_diff > 10 right. how represent 10hours? 10*60? or there way @ least convert given time format epoch using datetime or time::local? how can pass a date parameter datetime constructor? my $dt1 = datetime-> new ( year =>'1998', month =>'4', day

Cross field validation with Hibernate Validator (JSR 303) -

is there implementation of (or third-party implementation for) cross field validation in hibernate validator 4.x? if not, cleanest way implement cross field validator? as example, how can use api validate 2 bean properties equal (such validating password field matches password verify field). in annotations, i'd expect like: public class mybean { @size(min=6, max=50) private string pass; @equals(property="pass") private string passverify; } each field constraint should handled distinct validator annotation, or in other words it's not suggested practice have 1 field's validation annotation checking against other fields; cross-field validation should done @ class level. additionally, jsr-303 section 2.2 preferred way express multiple validations of same type via list of annotations. allows error message specified per match. for example, validating common form: @fieldmatch.list({ @fieldmatch(first = "password", seco