Posts

Showing posts from April, 2013

java - Importing a table from RDBMS to HDFS without using Sqoop -

i have been using sqoop while now. want import rows of table (present in rdbms) in hdfs without using sqoop. getting mongodb collection data hdfs, can use mapreduce job. in same way, can data rdbms hdfs using mapreduce job? if how can it?

php - Google translate api cUrl not working in a Laravel 5 project -

i getting server response of 0 each time try , fetch response using standard curl functionality within laravel project. has nothing combination think when access way other url works fine... kinda lost... in controller have function below: $curl = "https://www.googleapis.com/language/translate/v2?key=my-key&source=en&target=nl&q=hello%20world"; echo $curl; $handle = curl_init($curl); curl_setopt($handle, curlopt_url, $curl); curl_setopt($handle, curlopt_returntransfer, true); $response = curl_exec($handle); $responsedecoded = json_decode($response, true); $responsecode = curl_getinfo($handle, curlinfo_http_code); if($responsecode != 200) { echo 'fetching translation failed! server response code:' . $responsecode; } else { echo 'source: ' . $text . '<br>'; echo $responsedecoded['data']; } curl_close($handle); the output 0 , error code 0 (zero) while when access https://www.googleapis.com/language/transla...

c# - DataAnnotation Presentation Working on IIS Express but Not Working on IIS -

i'm developing asp.net mvc application, , controlling presentation of element properties using data annotations. result fine on iis express directly visual studio, when deploy uat server annotations fail. code: edit.cshtml: @html.editorfor(m => m.globalizedelement) model: public class globalizedelement { [hiddeninput(displayvalue = false)] public int id { get; set; } [hiddeninput(displayvalue = false)] public int elementid { get; set; } [hiddeninput(displayvalue = false)] public string culturecode { get; set; } [datatype(datatype.multilinetext)] [allowhtml] [display(name = "internaldescription", resourcetype = typeof(entitydataannotations))] [required(errormessageresourcetype = typeof(entityvalidation), errormessageresourcename = "requiredinternaldescription")] public string internaldescription { get; set; } [datatype(datatype.multilinetext)] [allowhtml] [display(name = "interview...

office365 - Upgrade MS Access 2010 Solution to Office 365 MS Access version -

we have application front end built on ms access vb.net code have ms access db , backend sql db. in process of upgrading ms access 2010 solution office 365 version. took free trail subscription office 365 enterprise e3 version , don't see ms access module in cloud. do need settings make visible in cloud? or office 365 doesn't support ms access in cloud? if ms access available in cloud, have solution deployed in cloud users can work cloud version without installing access on local desktops/mobile device (like ms excel , word). please let me know if solution feasible , office 365 has ms access in cloud? thanks, there feasible solution, access application can deployed sharepoint in office 365. access app hosted in sharepoint app. sharepoint users able run access app after publish sharepoint. here link on how step step: http://zimmergren.net/technical/building-apps-for-sharepoint-in-office-365-using-access-2013 hope helps :)

ios - UiView setFrame object -

on swift project i'm using obj-c frameworks. far works fine, i'm trying convert old code written on obj-c swift . i managed translate except line of code: [[self.view viewwithtag:ar_view_tag]setframe:arviewframe]; for i'll grateful. maybe this? i'm assuming ar_view_tag int... if let selectedview = view.viewwithtag(ar_view_tag) { // selectedview }

java - How to retrieve,update,delete data from database using DAO method in Hibernate -

how retrieve,update,delete data database using dao method in hibernate. my dao this: package com.sample.common.impl; import java.util.list; import com.sample.common.employee; public interface employeedao { public list<employee> getallemployee(); public void updateemployee(employee emp); public void deleteemployee(employee emp); } my implementation class this: package com.sample.common.impl; import java.util.arraylist; import java.util.list; import org.hibernate.sessionfactory; import com.sample.common.employee; public class employeedaoimpl implements employeedao { private sessionfactory sessionfactory; public list<employee> getallemployee() { return null; } public void updateemployee(employee emp) { } public void deleteemployee(employee emp) { } } how create query select,update , delete. can please suggest possible solution you have update code below public void deleteemployee(employee emp) { ...

git - get size of commit from github api -

i've been looking through github api trying work out there's simple way size of commit, i.e. what's amount of change took place: https://developer.github.com/v3/repos/commits/ my google , stackoverflow searches turned up: git: show total file size difference between 2 commits? and few other command line options, wonder if knows of way through github api? many in advance

php - Parse error: syntax error, unexpected '!' -

this question has answer here: php parse/syntax errors; , how solve them? 12 answers this php code <?php if ($_post['submit']){ if (!$_post['email']) $error.="</br>please enter email address"; else if !(filter_var($_post['email'], filter_validate_email)) $error = "</br>please enter valid email address."; if (!$_post['password']) $error.="</br>please enter password."; if($error) echo "there error(s)".$error; } ?> i don't find mistake there. showing error parse error: syntax error, unexpected '!', expecting '(' in c:\xampp\phpmyadmin\abc\projects\s_diary.php on line 5 i not experienced in php. so, please me... the first else if missing parentheses around if-expression, in: else if ( !(filt...

xcode - How can I enable UnAligned Access for ARM NEON in LLVM compiler? -

what flag enable unaligned memory access arm neon in llvm compiler. testing arm neon intrinsic program in xcode. accessing data unaligned memory: char tempmemory[32] = {0}; char * ptempmem = tempmemory; ptempmem += 7; int32x2_t i32x2_value = vld1_lane_s32((int32_t const *) ptempmem, i32x2_offset, 0); equivalent assembly intrinsic should vld1.32 {d0[0]}, [ptempmem] , compiler align next multiple of 32 , access data. because of that, program not working fine. so, how can enable unaligned access in llvm compiler? this isn't neon problem, it's c problem, , issue is: vld1_lane_s32((int32_t const *) ptempmem , i32x2_offset, 0); casting pointer message compiler saying "hey, know looks bad, trust me, know i'm doing". converting pointer type a pointer type b, if pointer not have suitable alignment type b, gives undefined behaviour. therefore compiler free assume argument vld_1_lane_s32 32-bit aligned because there's no valid way couldn't (...

Implementing Charts.js in Laravel 5.1 -

hi i've been wondering around net getting answers can't find one. i'm trying display chart using charts.js.. in route: route::get('surveys/chart', 'aboutcontroller@projectchartdata'); in aboutcontroller: used json_encode() pass data view public function projectchartdata() { $devlist = json_encode(db::table('surveys') ->select(db::raw('monthname(updated_at) month'), db::raw("date_format(updated_at,'%y-%m') monthnum"), db::raw('count(*) projects')) ->groupby('monthnum') ->get()); return view('pages.chart',compact('devlist')); } in view: <canvas id="projects-graph" width="1000" height="400"></canvas> <script type="text/javascript"> $(function(){ $.getjson("surveys/chart", function (result) { alert('...

Is JMS message doesnt rollback to queue in exceptional case spring batch JMSItemReader implementation -

in development work have use spring batch jmsitemreader read messages hornetq. trying test scenario rollback jms messages queue in case errors occurs in spring batch process. doesnt work me. for ex: spring step execution table showing rollback count 1. doesnt rollback message queue. i used following configuration in xml. <batch:job id="submitorderjmstowebservicejob"> <batch:step id="submitorderjmstolocatestep"> <batch:tasklet transaction-manager="mytxmanager"> <batch:chunk reader="jmsmessagereader" reader-transactional-queue="true" processor="jmsmessageprocessor" writer="jmsmessagetowebsevicewriter" commit-interval="1" /> </batch:tasklet> </batch:step> </batch:job> <bean id="jmsmessagereader" class="org.springframework.batch.item.jms.jmsitemreader"> <property nam...

Change width size using CSS when window size is reduced -

in general, want body div 60% width of window size. there exceptions. on large monitor, gets big, have set max-width of 800px, so: #lbp-text-body {margin-top: 100px; width: 60%; max-width: 800px; text-align: justify} this works pretty good, text adjusts within range, @ max threshold holds shape. now want similar small window sizes. i've added 'min-width: 300px;' , seems seems override width 60%, however, if screen size less 300px, user have scroll horizontally see part of text. i prefer actual width size change 90% or 100% after viewer size hits 300px threshold. any ideas on how this? you can use media query achieve this: js fiddle example @media screen , (max-width: 300px) { #lbp-text-body { // whatever styles want have @ 300px or less } } you can use media-queries have specific styles if window greater specific width using min-width . @media screen , (min-width: 800px) { #lbp-text-body { // whatever styles want have @ 800p...

delphi - TMetaFileCanvas and DrawTextEx with DT_RIGHT flag and Arial font -

Image
my program must use tmetafile objects draw text on timage. call system function "drawtextex". when assign "arial" font , right alignment (flag dt_right) text truncated @ end if string contains lots of "1" chars (i.e.: "111111111111111112" string). the white square far smaller timage canvas. i've posted question topic answer didn't work tmetafile. following code reproduce issue: procedure tform2.test2click(sender: tobject); var rc: trect; s : string; oldbrushcolor: tcolor; oldbrushstyle: tbrushstyle; metacanvas: tmetafilecanvas; begin // in example, image1 size w:585, h:225 metacanvas := tmetafilecanvas.create(image1.picture.metafile, 0); rc := rect(10, 10, 200, 200); oldbrushcolor := metacanvas.brush.color; oldbrushstyle := metacanvas.brush.style; metacanvas.brush.color := clwhite; metacanvas.brush.style := bssolid; metacanvas.rectangle(rc.left, rc.top, rc.right, rc.bottom); metacanvas.b...

cakephp - Cake php multidimensional array -

i have array coming join query when debug found output. here code in controller $agetfeaturegigs = $this->gigs->getfeaturegigs(); $this->set('agetfeaturegigs', $agetfeaturegigs); $yourvalue='7'; foreach($agetfeaturegigs $key => $val) { $agetfeaturegigs[$key]['gigs']['manual'] = $yourvalue; } output array( (int) 0 => array( 'usersjoin' => array( 'action' => 'yes' ), 'gigs' => array( 'id' => '2', 'username' => 'nmodi', 'category' => 'creativity & designing', 'subcategory' => 'logo design', 'picture' => 'banner_logo1.jpg', 'video' => '', 'title' => 'i design 2 awesome logo design in 48 hours', 'delivery' =>...

Pass generic type in c++ method as parameter -

i trying implement c++ method , want pass generic parameter in it. want assign parameter object's property. here example: class myclass { public: unsigned long long var1; unsigned short var2; signed short var3; } now have global object of myclass in someotherclass , method says: void someotherclass::updatemyclassvalue(int paramtype, <generic> value) { switch(paramtype) { case1: objmyclass.var1 = value; case2: objmyclass.var2 = value; case3: objmyclass.var3 = value; } } how pass such type, because if use fixed type e.g unsigned long long parameter type, won't able assign var2 & var3. don't want loose data, e.g signed data may have -ve value. please me overcome situation, have no experience working in c++. not sure if can achieve using templete<> in c++, if yes how? thanks pass parameter pointer: void someotherclass::updatemyclassvalue(int paramtype, v...

angularjs - Service singleton across all controllers -

if have following : <div ng-controller="mainctrl"> {{vm.name_from_service}} </div> .... <div ng-controller="mainctrl"> {{vm.name_from_service}} </div> lets both pull name_from_service value factory/service , correct assume same service singleton being used across both mainctrl controller instances ? note mainctrl used twice. controller code snippet : $scope.vm.name_from_service = someservice.getname(); snippet #2 : both ng-view , immediate div below use same service retrieve name_from_service, name_from_service update in 1 place. <div ng-controller="mainctrl"> section 1 {{vm.name_from_service}} </div> <div id="ngviewcontainer" ng-view=""></div> also not using asynchronous ajax calls retrieve name_from_service angular should aware of changes. i've tried using $timeout , $apply() . no dice . i refactored , separated out unrelated...

oracle - Total count in sql -

i need create view display total number of students have declared 2 majors ( major1 , major2 not null). what query should use? my goal single row of output know order by clause irrelevant in case. something this: create view getnumberofstudentswithmajor select count(*) dbo.students major1 not null , major2 not null

php - selecting rows from database between two dates giving wrong results -

selecting rows database between 2 dates giving wrong results, below query not working me. tried answers, 1 not giving correct results.i think, missing somewhere. select * table date between '07/10/2015' , '07/14/2015' changed select * table date between '07-10-2015' , '07-14-2015' still not working! that's right, can not use between statement when data type format not date or datetime , must change data type first. btw realized data type date/datetime format can't use / in sql statement when using mysql, versus sql can use / when column data type date/datetime . correct me if i'm wrong...

laravel - Including Sub-Views in Blade -

i'm trying include 2 sub-views ( 'login' , 'register' ) in 'home' view this: @extends('master') @section('content') @include('auth.login') <hr> @include('auth.register') @endsection and 'login' , 'register' views: //register.blade.php @extends('master') @section('content') {!! form::open() !!} <div class="form-group"> {!! form::label('email', 'email address') !!} {!! form::email('email', null, ['class' => 'form-control', 'placeholder' => 'email address', 'required' => true]) !!} </div> <div class="form-group"> {!! form::label('password', 'password') !!} {!! form::password('password', ['class' => 'form-control...

applescript (automator) how can I access properties of the selected image in keynote? -

tell application "keynote" activate tell front document tell current slide set imageitem **image 1** end tell end tell end tell when use such script, can access images index. however, if want selected image in keynote, should do? thank much! this not possible, because keynote doesn't have selection property

C# XML Serialization Not working -

i have following code supposed deserialize xml string class has of items in xml file, may not have them fine should assume null. when run following code using xml below leaves each value null. any pointers i'm going wrong thanks serviceresponse returnval = new serviceresponse(); try { xmlserializer serializer = new xmlserializer(typeof(serviceresponse)); stringreader sr = new stringreader(xmlresponse); namespaceignorantxmltextreader xmlwithoutnamespace = new namespaceignorantxmltextreader(sr); returnval = (serviceresponse)serializer.deserialize(xmlwithoutnamespace); } catch (exception ex) { throw ex; } [xmlroot("serviceresponse")] public class serviceresponse { public string requesttype { get; set; } public string applicationsender { get; set; } public string workstationid { get; set; } public string popid { get; set; } public string requestid { get; set; } public string referencenumber { get; set; } ...

osx - PHP 56 installation via Homebrew -

i've used php56 installation via homebrew on mac time , getting error when attempting run php: dyld: library not loaded: /usr/local/lib/libcrypto.1.0.0.dylib referenced from: /usr/local/bin/php reason: image not found [1] 97410 trace trap php -v everything i've searched online points openssl version difference shipped os x, said haven't run issue months (at least) until past day or 2. (also, forcing link on openssl via homebrew break warns? may seem solve issue). i've removed think may have interfered, (rbenv, rvm, wiped , reinstalled homebrew, etc). has run issue? why happening after everything's been running smoothly long? try rebuilding php source: brew reinstall php56 --build-from-source looks openssl upgraded @ same time , broke php.

python - parsing xml containing default namespace to get an element value using lxml -

i have xml string this str1 = """<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc> http://www.example.org/sitemap_1.xml.gz </loc> <lastmod>2015-07-01</lastmod> </sitemap> </sitemapindex> """ i want extract urls present inside <loc> node i.e http://www.example.org/sitemap_1.xml.gz i tried code didn't word from lxml import etree root = etree.fromstring(str1) urls = root.xpath("//loc/text()") print urls [] i tried check if root node formed correctly. tried , same string str1 etree.tostring(root) '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n<sitemap>\n<loc>http://www.example.org/sitemap_1.xml.gz</loc>\n<lastmod>2015-07-01</lastmod>\n</sitemap>\n</sitemapindex>' this common error when dealing xml having default namesp...

javascript - how to call an ajax function with dynamic ID's- MVC -

i try update dropdownlist selected item in dropdownlist . page contain option multiple dropdownlist same data @model list<cimenacityproject.models.timescreening> @{ viewbag.title = "create"; int? numberofnewtimescreening = viewbag.number; if (!numberofnewtimescreening.hasvalue) { numberofnewtimescreening = 1; } (int = 0; < numberofnewtimescreening; i++) { } var selectmovieid = (selectlist)viewbag.movieid; var selecthomecinemaid = (selectlist)viewbag.homecinemaid; } <h2>create</h2> @using (html.beginform("create", "timescreening", formmethod.post)) { @html.antiforgerytoken() <div class="form-horizontal"> <h4>timescreening</h4> <hr /> @html.validationsummary(true) <table> <tr> <th> @html.label("showtime", new { @class = "control-label col-md-2" }) </th> <th...

xml creation using java -

i want iterate on xml given below: <annotation> <properties> <propertyvalue propertyname="field_label">label.modelseriescd</propertyvalue> <propertyvalue propertyname="containertype">conditioncontainer</propertyvalue> </properties> </annotation> i trying these codes: 1) while(currentnode.haschildnodes()){ system.out.println(currentnode.getnextsibling()); currentnode=currentnode.getnextsibling(); } 2) for (int x = 0; x < childnode.getlength(); x++) { node current = childnode.item(x); if (node.element_node == current.getnodetype()) { string cn = current.getnodename(); system.out.print(cn +" = "); str...

Cloudant Query android -

i using cloudant store user details when register application shown below: { "_id": "xxx", "_rev": "xxx", "encrypted_password": "testing123", "username": "testing", "email_address": "test@hotmail.com" } i want authenticate user searching through documents same username , password provided user code doesn't seem work. code shown below: public boolean authenticateuser(final string username, final string password) { map<string, object> query = new hashmap<string, object>() { { put("username", username); put("password", password); } }; queryresult result = indexmanager.find(query); if(result != null) return true; // reach here if no existing username found return false; } cloudant query: https://github.com/cloudant/sync-android/blob/master/doc/query.md your document doesn't see...

Laravel - How to a try/catch in blade view? -

i create way compile in view, try/catch. how can in laravel? example: @try <div class="laravel test"> {{ $user->name }} </div> @catch(exception $e) {{ $e->getmessage() }} @endtry you should not have try / catch blocks in view. view that: representation of data. means should not doing logic (such exception handling). belongs in controller, once you’ve fetched data model(s). if you’re wanting display default value in case variable undefined, can use or keyword: {{ $user->name or 'name not set' }}

css - Wrap hyperlink text in navbar -

this question has answer here: how word-wrap url? 1 answer thanks in advance help! have looked @ several posts wasn't able find solution saved problem or addressed issue facing. building fixed navbar using bootstrap 3.3.5. of hyperlink text long. want wrap hyperlink text. need use dropdowns well. have been trying wrap text unsuccessfully. i have tried creating links in <p> this: <li><div><p class="navber-text"><a href="#temp_url">a long , wordy link goes here</a></p></div></li> i have tried adding: @media (min-width: 768px) { .navbar-text { float: left; margin-right: 15px; margin-left: 15px; white-space:normal !important; max-width:200px; word-wrap: normal; } to custom.css file , can't seem work. would mind showing me making mistake? button g...

javascript - how to take a html webpage as a screenshot and send as a image to mail -

i want html webpage sent email screen shot when click confirm button, client can have total webpage image. new java script. tried in many ways not working me correctly. suggestion appreciable , helpful me, using below code..... <div class="container" style="padding-top: 15px;"> <div id="site"> <form action="cart.php" method="post" id="" > <table><tr> <div id="content"> <td> <form action="" method="post" id="checkout-order-form" style="margin-top: 50px;"> <h2>confirm details</h2> <fieldset id="fieldset-shipping"> <div class="form-group col-md-6" style="padding-left: 15px;width:330px;"> <input type="text" name="name" id="name" class="form-contro...

java - Spring. How does Feed Adapter get the number of rss news? -

i newbie in spring , keep trying understand it. reading rss. beans.xml is: <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:feed="http://www.springframework.org/schema/integration/feed" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd http://www.springframework.org/schema/integration/feed http://www.springframework.org/schema/integration/feed/spring-integration-feed.xsd"> ...

c# - Inherited auto-implemented property with private setter -

i have base class , derived class. each has same property has private setter value can set logic inside class. class first { internal virtual int value { get; private set; } void setvalue(int tovalue) { value = tovalue; } } class second : first { internal override int value { get; private set; } void setvalue(int tovalue) { value = tovalue; } } this resulting in compiler error: the property or indexer ... cannot used in context because set accessor inaccessible. why case, , how can achieve i'm trying do? not possible auto-implemented properties, in other words, have use backing field instead? second unable set value of value first due value s setter being private . if need subclass able set it, needs protected in base.

javascript - Webpack creating duplicate entries for dependencies -

i trying switch using browserify webpack. 1 thing browserify handled nicely dependency management inside dependencies. let me give example: main app project: var util1 = require('shared-components/util1'); var util2 = require('shared-components/util2'); inside shared-components/util1.js var util2 = require('../util2'); browserify realize reference util2 in both scenarios same appears webpack not creates duplicate entries util2. is there configuration setting or plugin can use resolve this? try new webpack.optimize.dedupeplugin() . see the docs more info.

javascript - tinymce skin in IE 11 compatibility mode -

i'm using newest version of tinymce (4.2.1), whenever switch compatibility mode, tinymce use skin.ie7.min.css instead of skin.min.css. makes icon disappear. i tried compatibility mode in tinymce home page no different, skin.min.css still in use. this happen on ie 11, ie 10 working fine, know what's happening ? i had same problem, , fixed line: <meta http-equiv="x-ua-compatible" content="ie=edge" />

jsf - Update form on h:commandButton action -

i have button per row in h:datatable deletes record. action works deletes record. table doesn't update, i'm not sure what's wrong? here's jsf <h:form id="usersform" rendered="#{not empty usercontroller.users}"> <h:datatable id="userstable" value="#{usercontroller.users}" var="user"> <h:column>#{user.name}</h:column> <h:column>#{user.location.location}</h:column> <h:column> <h:commandbutton value="delete" action="#{usercontroller.delete(user)}"> <f:ajax render="usersform userstable"/> </h:commandbutton> </h:column> </h:datatable> </h:form> edit: don't believe answer pointed quite same, after @ answer found generated html had table defined <table id="usersform:userstable...

applepay - Apple pay from Braintree -

i use apple pay via braintree, , got error when created sale. error code 91577(payment instrument not supported merchant account). i work @ braintree. questions specific braintree platform, best bet get in touch our support team . this error means merchant account not set accept apple pay. if happens need contact braintree support details of how trigger problem , account info.

arrays - Writing a continous 'for' loop in java -

i'm new java , studying on for loops online tutorials , question stuck mind. explain doubt using example. lets there int array of size 4 elements {1, 2, 3, 4} . suppose user wants print elements of array in way : {3,4,1,2,3,4,1,2,3,4} the user wants print array third number till end of array , if array ends, array should start again first , goes on until total numbers printed should 10 . can possible ? or there way can achieve ? can loop printed again first after ends? tried thinking of using list not able come answer. kindly me giving suggestions. thanks you use modulo % operator loop through array multiple times. code below prints numbers in format described. int[] array = {1, 2, 3, 4}; int start = 2; // 0 indexed position of 3rd number int numtimestoprint = 10; system.out.print("{"); (int = 0; < numtimestoprint; i++) { if (i > 0) system.out.print(","); system.out.print(array[(i + start) % array.length]); } system....

oracle - Invalid file operation in pl/sql -

i learning pl/sql , have been getting error "invalid file operation since long" code follows: set serveroutput on; create or replace directory desktop 'c:\users\gadre\desktop'; declare v1 varchar2(32767); f1 utl_file.file_type; begin f1 :=utl_file.fopen('desktop','test.docx','r'); dbms_output.put_line('hello world'); end; the error is: error report: ora-29283: invalid file operation ora-06512: @ "sys.utl_file", line 536 ora-29283: invalid file operation ora-06512: @ line 5 29283. 00000 - "invalid file operation" *cause: attempt made read file or directory not exist, or file or directory access denied operating system. *action: verify file , directory access privileges on file system, , if reading, verify file exists. the file exist surely. plus through admin access think have privileges.

Probleme with portable class and MathNET spatial -

i everybody, i try install math.net spatial in portable class librairy in visual studio 2013 error. following error in nuget console : install failed. rolling back... install-package : not install package 'mathnet.spatial 0.2.0-alpha'. trying install package project targets 'portable-net45+ win+wpa81+wp80', package not contain assembly references or co ntent files compatible framework. more information, cont act package author. @ line:1 char:16 + install-package <<<< mathnet.spatial -pre + categoryinfo : notspecified: (:) [install-package], invalidoper ationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.c ommands.installpackagecommand it works when use none portable class librairy on frame work 4.0 should work indicate on website : http://spatial.mathdotnet.com/ mathnet.spatial - core package, including .net 4, .net 3.5 , portable/pcl builds. some apprecia...

ios - Your iPhone is not available. Please select a different device and try again -

i'm getting following error when try build watch os 2 app on iphone (ios 9.0b2) paired apple watch (watchos 2.0b2). your iphone not available. please select different device , try again. i've tried obvious things, restarting iphone, watch, mac, etc. software updated latest version , watch paired iphone. have ideas? connect phone , open itunes. once "trust iphone" sequence complete via itunes, phone recognized in xcode.

java - org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: Oracle Error ORA-12650) -

i using apache common dbcp 1.2.2 jar create database datasource in project database side have upgraded database oracle 11.2.0.4.1 oracle 11.2.0.4.5. below code: driver=oracle.jdbc.driver.oracledriver url=jdbc:oracle:thin:@(description=(address_list=(address=(protocol=tcp)(host=oramtbdocq.qs2x.vwg)(port=1560)))(connect_data=(server=dedicated)(service_name=mtbdocq.qs2x.vwg))) initialsize=10 maxidle=10 maxactive=10 we using ojdbc7.jar since jdk 1.7 code 1: trying make jdbc connection using dbcp 1.2.2 jar try{ org.apache.commons.dbcp.basicdatasource datasource = new basicdatasource(); datasource.setdriverclassname(driver); datasource.seturl(url); datasource.setusername(username); datasource.setpassword(password); datasource.setinitialsize(initialsize); datasource.setmaxidle(maxidle); datasource.setmaxactive(maxactive); basicdatasourcecon =datasource.getconnection(); system.out.println(...

Change multiple properties of a DOM element with javascript -

i have simple function called loadstyles() here is: function loadstyles(url) { var link = document.createelement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = url; link.media = 'all'; (document.getelementsbytagname("head")[0] || document.documentelement).appendchild(link); } i wondering if there's way of adding values of properties except one: link.rel equals ... , link.type equals ... , etc. i tried this: function loadstyles(url) { var link = document.createelement('link'); link += { rel: 'stylesheet', type: 'text/css', href: url, media: 'all' }; (document.getelementsbytagname("head")[0] || document.documentelement).appendchild(link); } but doesn't work. know it's stupid try (because ide says {....} expression not assignable type html element ^^'). ...

AngularJS module inside "root module" -

is there way define angular module inside module ? have template in web application called every page of application. in template definition set ng-app. ng-app can declare modules need in pages of application (or every page). there modules want add on specific pages. problem in pages have ng-app of template. so there way keep ng-app kind of root ng-app declared modules need everywhere , add specific modules inside specific pages ? that means possible this: <div ng-app="rootapp"> <div ng-app="specificapp"> ... </div> </div> the rootapp contains module declared in template, use in pages, , specifiapp contains modules need in 1 specific page. thanks ! [edit] bootstrap attempt: var reportholidaysbyemployeeapp = angular.module('reportholidaysbyemployeeapp', ['fitnetapp', 'ui.bootstrap']); angular.bootstrap(document.getelementbyid("reportholidaysbyemployeeapp"), ['...

java - Trying to convert gregorian calendar to islamic calendar -

i have used hijri jar convert gregorian date islamic date if ramzan delayed day or how can set islamic date according islamic date use script, it's easy edit http://www.ar-php.org/ar-example-date-php-arabic.html

Foreach loop not working in android for custom object -

i trying store count of number of times item list view clicked in custom array list in code quantity of first clicked item increasing , if click on other item gets added list view instead of increasing quantity. please tell me if know other method count. listview.setonitemclicklistener(new adapterview.onitemclicklistener() { @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { flowers item = (flowers) parent.getadapter().getitem(position); if(item == null) { toast.maketext(getbasecontext(),"item null",toast.length_long).show(); }else { selecteditems items = new selecteditems(); items.setname(item.getname()); items.setcategory(item.getcategory()); counter counter = new counter(); if(selecteditemsarraylist.isempty()) { ...

caching - Spring Security - No way to avoid cache-control -

i have application , use controller mapping of spring load images users. (inputstream, response, etc). in controller set headers cache-control, baseaded on files, etc. there's pragma: no-cache , cache-control:"max-age=0" inside requests, , that's replace response settings. i trying solve this, nothing works. i read page , try found that: http://docs.spring.io/autorepo/docs/spring-security/3.2.0.ci-snapshot/reference/html/headers.html my spring security.xml has: <security:headers disabled="true"/> anyone have idea solve this? remember load images need load through controller, never call static directly. the cache-control headers can controlled on per action basis overriding them in httpservletresponse : @requestmapping(value = "/foo", method = requestmethod.get) public string someaction(httpservletresponse response) { response.setheader("cache-control", "no-transform, public, max-age=86400...

css - Select nth element for elements that do not share the same immediate parent -

how select 4th (or specific) li element in following html structure? possible? (from understanding :nth-child , :nth-of-type require elements siblings.) <div> <ul> <li>apple</li> <li>banana</li> <li>pear</li> </ul> <ul> <li>melon</li> <li>mango</li> </ul> <ul> <li>strawberry</li> </ul> </div> the above structure dynamic, don't know how many ul elements there nor how many li elements each of them contains. there still way select nth li element on page? jsfiddle: click i using less. there in less me? update : found :nth-match css4 pseudo class not (yet) supported: css nth-match doesn't work , comments/answers confirm belief not possible today... :( since :nth-child , other similar selectors make matches based on sibling elements , css has no parent-wise selec...

c# - Routing wrong access the action -

by default url routing in mvc {controller}/{action}/{id} . can access mydomain.com/products/details/1 , etc. now, have register map route called categorylandingpage . routes.maproute( name: "categorylandingpage", url: "category", defaults: new { controller = "category", action = "index" }); so show category in page. then register map route called categorydetails routes.maproute( name: "categorydetails", url: "category/{categoryname}", defaults: new { controller = "category", action = "details", categoryname = urlparameter.optional }); when access mydomain.com/category/cars , show products related cars. same controller have another actions such create,edit,delete, , more . the problems is,when access mydomain.com/category/create go details action . not go create action in category contoller. how can solved matter? two ways: either use route constraint ensure {categorynam...

java - How can I make a Maven module only go until the test phase when the parent gets deployed? -

i'm working on multi-module project. 1 of our module tests project, tests other modules. first question: pratice? the maven build lifecycle phases are: validate compile test package integration-test verify install deploy when installing or deploying parent module, how can make tests module go until test phase, i.e. skip package , following phases? since purpose of module test other ones. i assume jar project. @ plugin bindings default lifecycle reference . bind default executions of maven-jar-plugin , maven-install-plugin , maven-deploy-plugin plugins none phase in pom.xml <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-jar-plugin</artifactid> <version>2.6</version> <executions> <execution> <id>default-jar</id> <phase>none</phase> </execution> </executions> </plugin...