Posts

Showing posts from July, 2012

Solstice dates on iOS -

i'm in process of putting app makes use of suns position @ both summer , winter solstice. while there plenty of tables of data out there, i'm wondering if there standard ios components can used calculate or retrieve solstice dates without having embed , lookup data. taking advice comments, following implemented gregorian date hours , minutes julian date. - (nsdate *) datefromjuliandate:(double)juliandate { nscalendar *gregoriancalendar = [[nscalendar alloc] initwithcalendaridentifier:nsgregoriancalendar]; nsdate *gregoriandate; double datepart = floor(juliandate); double timepart = juliandate - datepart + 0.5; // next calendar day? if (timepart >= 1.0) { timepart = timepart - 1.0; datepart = datepart + 1; } double l = datepart + 68569; double n = floor (4 * l / 146097); l = floor(l) - floor((146097 * n + 3) / 4); int year = floor(4000 * (l + 1) / 1461001); l = l - (floor(1461 * year / 4)) + 31; int month = floor(80 * l / 24...

centos7 - Nginx doesn't redirect to index.php page of phpmyadmin -

i installed nginx, php-fpm , phpmyadmin. www folder. [root@vmi67073 etc]# ll /usr/share/nginx/html/ -rw-r--r-- 1 root root 3650 feb 13 18:45 404.html -rw-r--r-- 1 root root 3693 feb 13 18:45 50x.html drwxr-xr-x 3 root root 40 mar 17 06:14 myapp.eu -rw-r--r-- 1 root root 3700 feb 13 18:45 index.html lrwxrwxrwx 1 root root 22 mar 17 06:52 mysql -> /usr/share/phpmyadmin/ my nginx conf file location phpmyadmin under myapp.conf file looks this location /mysql { alias /usr/share/phpmyadmin; location ~ \.php$ { index index.php index.html index.htm; include fastcgi_params; fastcgi_param script_filename $request_filename; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; } } problem: if try access myapp.eu/mysql following error in nginx log 2016/03/17 09:21:01 [error] 2119#0: *28 directory index of "/usr/share/phpmyadmin/" forbidden, client...

windows - Zend - Couldnt load Zend/Application.php (failed to open stream)? -

i have structure below (i'm using zend 1.9.6): http://farm3.static.flickr.com/2605/4112306785_fc80d39833_o.gif (i'm sorry. i'm not enough reputation.) when run program, error: *warning: require_once(zend/application.php): failed open stream: no such file or directory in c:\xampp\htdocs\myzend\index.php on line 25 fatal error: require_once(): failed opening required 'zend/application.php' (include_path=';c:\xampp/application/modules/admin/models;.;c:\xampp\php\pear') in c:\xampp\htdocs\myzend\index.php on line 25* here index.php <?php date_default_timezone_set('asia/ho_chi_minh'); // define base path obtainable throughout whole application defined('base_path') || define('base_path', realpath(dirname(__file__) . '/../..')); // define path application directory defined('application_path') || define('application_path', base_path . '/application'); ...

java - Defining two same group names in regex -

string strr = "{msg=1234,returncode=123}"; pattern pat1 = pattern.compile("^\\{returncode=(?<returncode>\\d+)(,msg=(?<msg>.*))?\\}|(\\{msg=(?<msg2>.*),returncode=(?<returncode2>.+)\\})?$"); in fact, want define returncode in regex, compiler throws: named capturing group defined. how can solve it? maybe there easier way it. much string strr = "{msg=1234,returncode=123}"; pattern pat2 = pattern.compile("(?<key>\\w+)=(?<val>\\w+)"); matcher m = pat2.matcher(strr); while (m.find()) { if (m.group("key").equals("returncode")) { system.out.println(m.group("val")); // prints 123 } }

malware - Finding a PEiD database -

where can latest version of peid database? know 1 version available in github ( https://raw.githubusercontent.com/guelfoweb/peframe/5beta/peframe/signatures/userdb.txt ), more 1 year old , has approximately 4000 signatures. if you're looking database use in yara, there's yara-rules github page here has lot of preexisting rules , seems quite date. hope helps!

node.js - Post install after installing package? -

i've got scripts tag in package.json file: "scripts": { "postinstall": "<command>" } whenever i'm running npm install postinstall commands runs properly. if i'm passing arguments npm install command, example when installing new package: npm install <dependency> --save-dev . won't run postinstall command. is there way postinstall run if there arguments in npm install command? i think getting confused how packages work. package has it's own dependencies, post-installs , pre-installs. when install package this: npm install <dependency> this looks @ package want install , installs along it's dependencies, if package want install has preinstall or postinstall command, invokes them. only package , not yours. when npm install , installing your package, , therefore calls your package's postinstall command.

excel - VBA date double quotation mark gives triple quotation mark -

i have strange problem excel vba code. have date string column in csv spreadsheet wrap around in double quotation marks. wrote vba script in excel achieve this. however, everytime run script, date string output wrapped in 3 sets of double quotation marks instead of one. i this: """2015-11-11 00:00:00.40""",59845,-0.20375,3.447,2.0135,32.08286,12,32,11.6 instead of this: "2015-11-11 00:00:00.40",59845,-0.20375,3.447,2.0135,32.08286,12,32,11.6 where going wrong? have tried using char(34) , chr(34) represent " has not helped. here script: sub quotations() ' ' quotations macro ' ' dim strfile string strfile = dir("e:\copy\*.csv") ' create new workbook , assign variable dim wb workbook while len(strfile) > 0 set wb = workbooks.add windows("personal.xlsb").activate wb.activate activesheet.querytables.add(connection:= _ "text;e:\copy\...

java - Webcam has low FPS when recording using OpenCV? -

i've been working on building java application using opencv grabs data webcam , records it. however, i've been unable achieve frame rates greater 10 fps (intel i5-5200u, 8 gb ram), doesn't seem right me. webcam supports 30 fps , 1280 x 720 resolution. recording @ 640 x 480 increases 12 fps. recording @ 720p (which need application) nets aforementioned 10. first idea videocapture.read() function takes relatively long time process, tried moving calls thread pool, gave no gain. i've read how fast library supposed be, must doing wrong. below loop capturing data: videocapture cam = new videocapture(); cam.open(0); // set proper resolution cam.set(videoio.cv_cap_prop_frame_width, camera_width); cam.set(videoio.cv_cap_prop_frame_height, camera_height); // matrix storing camera images, provided opencv arraylist<mat> frameslist = new arraylist<>(); long starttime = system.currenttimemillis(); if( ! cam.isopened()) { ...

C# SQL connection timeout -

i have strange case of sql connection timeout application written in c# .net. the sqlcommand.executenonquery() being used sequentially execute several scripts in sql server, 1 after another. each script contains command create 1 table (no data update/insert/delete operations @ all). reason, @ 1 of scripts, sqlcommand.executenonquery throws timeout exception. when execute creation of these tables in sql server management studio, executed fine , instantaneously. does has idea causing timeout when tables created application? all sql scripts similar following: sql: create table dbo.test ( code varchar(10) not null , name varchar(50) not null , other columns... primary key , unique key , foreign key ) the scripts shipped c# using code: try { using (sqlconnection consql = new sqlconnection ("[connection string]")) { using (sqlcommand cmdsql = new sqlcommand(ssql, consql)) { cmdsql.commandtimeout = itimeout; consql...

javascript - Using $.getJSON correctly -

this question has answer here: ways circumvent same-origin policy 11 answers i'm trying construct simple jquery function fetches json data url can't seem output. can tell me i'm going wrong? <button id="test">test</button> $(document).ready(function() { $("#test").click(function() { $.getjson('https://en.wikipedia.org/w/api.php?action=query&titles=main%20page&prop=revisions&rvprop=content&format=json', function(objdata) { document.write(objdata); console.log(objdata); }); }); }); it's access control / allow-origin thats tripping here. "no 'access-control-allow-origin'" this works: $('#test').on('click', function() { $.getjson('https://en.wikipedia.org/w/api.php?...

PHP PDO SQLite. Transaction and updating problems -

i have problem transaction in php-pdo-sqlite , updating. $db = new pdo('sqlite:database1.sqlite'); /* $rowsnumber1 = $db->exec("create table if not exists questions( id integer primary key autoincrement, question text not null, answers integer not null )"); print('$rowsnumber1: '.$rowsnumber1.'<br />'); $rowsnumber2 = $db->exec("create table if not exists answers( id integer primary key autoincrement, qid integer not null, answer text not null )"); print('$rowsnumber2: '.$rowsnumber2.'<br />'); */ //print('inserting: '); $res = $db->exec("insert questions (question,answers) values ('question',0)"); var_dump($res); print('<br />'); $qid = 1; try { $db->setattribute(pdo::attr_errmode, pdo::errmode_exception); $db->begintransaction(); // variant 1 //print('executing 1: '); $res1 = $db->exec("insert answers (qid,answer) values ($qid,...

c# - ASP.NET repeater get all items and checkbox if user has right -

i have asp.net application , display roles , add checkbox checked if user has right. use asp repeater roles how can check checkbox in same repeater user's role ? here code: <asp:repeater id="repeaterrole" runat="server" datasourceid="objectdatasource2"> <itemtemplate> <div> <asp:checkbox runat="server" checked="false" /> <asp:label cssclass="lbl" id="label1" runat="server" text='<%# eval("rolelabel")%>'></asp:label> </div> </itemtemplate> </asp:repeater> <asp:objectdatasource id="objectdatasource2" runat="server" selectmethod="getallrolestocollection" typename="business.businessobject.role"></asp:objectdatasource> <asp:repeater id="repeaterrole" runat="server...

ios - NSUserDefaults returns null after registerUserDefaults worked previously -

Image
my code worked before, doesn't reason. testing on device, removed app , tested test flight . defaults fail register. nsdictionary *appdefaults = @{ [nsnumber numberwithint:50]: @"didbuyinapppurchase", [nsnumber numberwithint:0]: @"adshow" }; nslog(@"appdefaults %@", appdefaults); [[nsuserdefaults standarduserdefaults] registerdefaults:appdefaults]; [[nsuserdefaults standarduserdefaults] synchronize]; nslog(@"user default ad show %@", [[nsuserdefaults standarduserdefaults] objectforkey:@"adshow"]); logs show appdefaults { 0 = adshow; 50 = didbuyinapppurchase; } so dictionary being created fine. , logging key: user default ad show (null) you used nsnumber numberwithint need retrive int using [nsuserdefaults integerforkey] like, nslog(@"user default ad show %ld", (long)[[nsuserdefaults standarduserdefaults] int...

javascript - Highlighting the sidebar links with scroll -

i have side bar settings page index. want appropriate links highlight every time scroll different section of page. realize has been asked before, , tried doing told in previous question . looked @ couple of blogs, though code seems quite complicated. html <div id="sidebar"> <nav class="navlinks"> <ul style="list-style:none" id="sidebar-id"> <li> <a href="#profile-settings"> profile </a></li> <li> <a href="#social-settings"> social media </a></li> <li> <a href="#"> logout </a></li> /ul> </nav> </div> <section id="profile-settings"> <!--some content--> </section> <secti...

android - how to use google play game services api in codename one -

how can use google play games services api in codename 1 want use login in game , save progress create leaderboard , achievement. if not possible may suggest alternative. you need add build hint android.playservice.games=true include , possibly other such hints here . to use need use native interfaces api isn't bound in codename one.

xml - First attempt php Joomla! plugin -

new php , plugin building. front end guy need learn templates building in joomla. have small 1 working gives ability insert , change text in function oncontentaftertitle . class plgcontentmyplugin extends jplugin { public function oncontentaftertitle($context, $article, $params, $limitstart) { if ($this->params->get('alt-text')) { return $this->params->get('alt-text'); } else { return "<p>hello world!</p>"; } now understanding xml determines backend options in admin control panel. using php display it. i want able extend plugin, learning purposes. have xml displaying options change font colour , size. little unsure on php , function should calling in order achieve that. should using 1 of other parameters? e.g. $context or $article? appreciated. <field name="font-size" type="list" default="12" description="what size font should message ...

angularjs - How to add pagination in Restangular and Django Rest Framework? -

in drf have added pagination limit 100 'paginate_by': 100, since restangular expects results in array form, had use below meta extractor function in angular app module var app = angular.module("myapp", ["restangular"].config(function( restangularprovider){ restangularprovider.setresponseextractor(function(response, operation, what, url) { if (operation === "getlist") { var newresponse = response.results; newresponse._resultmeta = { "count": response.count, "next": response.next, "previous": response.previous }; return newresponse; } return response; }); }); and controller looks like app.controller('datactrl',function($scope, restangular){ var resource = restangular.all('myapp/api/dataendpoint/'); resource.getlist().then(function(data){ $scope.records = data; }); } ...

node.js - use npm with different configuration than package.json -

i have complex production environment driven package.json. the problem: wish install locally additional packages, keep eye on list , versions of them. solution (how there): point npm use config file, excluded git, keep private dependencies. use file add packages local node_modules npm install . need change configuration context of npm. i have no clue how point npm use different config (something gulp -gulpfile ). update comments dev-dependencies not way go. use stuff 90% of other developers not need installed in node_modules (in fact break environment in strange way updating dev-dependencies in git-shared core project-wide package.json ). first of all, should know trying not weird, against lot of practices , patterns in nodejs. nevertheless, it's possible , if it's done right never cause trouble you, or other developers in different platforms. you can use little inspired on meteor build flow. let's break project conceptually 2 different parts...

Error recieved when compiling - AreaCalculationProgram.java:23: error: incompatible types: possible lossy conversion from double to int -

so, here code. calculates area of circle. import java.util.*; public class areacalculationprogram { public static void main(string [] args) { //code circle int radius, areaofcircle, area; scanner sc = new scanner(system.in); system.out.print("enter diameter of circle"); double diameter = sc.nextdouble(); integer intdiameter = sc.nextint(); diameter = intdiameter.doublevalue(); areaofcircle = (int) math.pow((diameter/2),2 ) * math.pi; system.out.print("areaofcircle" + area); shown below error get: areacalculationprogram.java:23: error: incompatible types: possible lossy conversion double int areaofcircle = math.pow((diameter/2),2 ) * math.pi; ^ why areaofcircle int? problem requirement? should use round/floor/ceil math class methods (depends)

performance - Compare two lists in python and print the output -

hi have list of lists , need compare value of each list 1 extracted xml file. structure similar this: [('example', '123', 'foo', 'bar'), ('example2', '456', 'foo', 'bar'), ...] i need compare second value of each list values in xml: for item in main_list: child in xml_data: if item[4] == child.get('value'): print item[4] the problem main_list has huge ammount of lines (1000+) , multiplied values xml (100+) results in lot of iterations becoming method unefficient. is there way efficiently? regards. a membership check on set faster manually iterating , checking: children = {child.get('value') child in xml_data} item in main_list: if item[4] in children: print(item[4]) here construct set simple set comprehension . note may worth swapping data in set - if main_list longer, more efficient make set of data. items = {item[4] item in main_list} c...

javascript - Suggestion in text box possible? -

i have input box type text: <input type="text></input> i have list of names: $scope.employees = [{ name: "vishnu" }, { name: "seenu" }]; now let 2. when type v , should show vishnu suggestion. when type se, should show seenu` suggestion. how can achieved? populate options of datalist values in $scope.employees data-ng-repeat : var app = angular.module('myapp', []); app.controller('mycontroller', function($scope, $http) { $scope.employees = [{ name: "vishnu" }, { name: "seenu" }]; }); <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <div ng-app="myapp" ng-controller="mycontroller"> <input type="text" list="names" placeholder="pick name.."> <datalist id="names"> <option data-ng-r...

css - Bootstrap Multiselect not displaying the dropdown list -

i have made custom binding bootstrap multiselect in knockout js. i new custom bindings in knockout js. i have taken this custom binding jsfiddle bootstrap select , adapted in this jsfiddle bootstrap multiselect , contain own viewmodel data. actual bootstrap multiselect button display, user sees multiselect element, upon clicking it, nothing drops down. inspecting webpage shows output html <select> : html (this correct - issue not this): <select multiple="multiple" data-bind="multiselect: _categoryid, optionstext: '_name', optionsvalue : '_id', multiselectoptions: { optionsarray: _categories }" class="multiselect" style="display: none;"> <option value="1">meat-free meat</option> <option value="2">dairy-free dairy</option> <option value="3">confectionery</option> <option value=...

arm - FreeRTOS on Teensy 3.2 -

i run latest version of freertos on teensy 3.2 using atmel studio visual micro. there procedural guide on how configure freertos source code? thanks i theory, possible run freertos on teensy 3.2 since features arm cortex-m4 ( mk20dx256's pdf manual ). - there @ least 2 challenges see question have asked: there no officially supported ports of freertos processor installed on teensy 3.2 . atmel studio cannot used since teensy 3.2 uses freescale chip, not atmel chip teensy 2.0 . ( atmel studio supports atmel products.) if you'd continue efforts port freertos mk20, you'll want check out freertos porting guide . an easier approach might secure alternative, low-cost development board develop code freertos on. consider researching/purchasing 1 of freertos education kits . provide platform learning how develop rtos , in case of freertos nxp lpcxpresso lpc1769 education kit , point free ide can download nxp.

ios - Type 'ViewController' does not conform to protocol 'Wsdl2CodeProxyDelegate' -

Image
when call wsdl2codeproxydelegate method showing type 'viewcontroller' not conform protocol 'wsdl2codeproxydelegate' error implemented required method @required.but don't know why getting error.can please solving issue.thanks in advance as can see on following url http://www.wsdl2code.com/ you need implement following methods, have implemented following methods. func proxyrecievederror(ex: nsexception, inmethod method: string) { } and func proxydidfinishloadingdata(data: anyobject, inmethod method: string) { }

jquery - Javascript: Play Preloading Screen until specific things are loaded -

a little background. currently, have preloading screen shows before page loaded set time. want able detect whether several elements loaded , ending preloading screen rather having set time preloading screen end. in fiddle, detect if images have been rendered , loaded , ending screen , understand , know how other element such random div or paragraph if possible. fiddle: https://jsfiddle.net/jzhang172/lyv17l0n/1/ $(document).ready(function() { settimeout(function(){ $('body').addclass('loaded'); $('h1').css('color','#222222'); }, 500); }); .loaded{ transition:1s; } .content{ background:gray; height:500px; width:100%; } #loader-wrapper{ position:fixed; background:black; top:0; bottom:0; left:0; right:0; transition:1s; } .loaded #loader-wrapper{ opacity:0; } .loader-section{ position:fixed; top:0; bottom:0; background:red; z-ind...

c++ - How to adjust the LineChart example from Qt Charts? -

i'm trying adjust linechart example qt charts library. here's code: #include <qtwidgets/qapplication> #include <qtwidgets/qmainwindow> #include <qtcharts/qchartview> #include <qtcharts/qlineseries> qt_charts_use_namespace int main(int argc, char *argv[]) { qapplication a(argc, argv); qlineseries *series = new qlineseries(); series->append(0, 6); series->append(2, 4); series->append(3, 8); series->append(7, 4); series->append(10, 5); *series << qpointf(11, 1) << qpointf(13, 3) << qpointf(17, 6) << qpointf(18, 3) << qpointf(20, 2); qchart *chart = new qchart(); chart->legend()->hide(); chart->addseries(series); chart->createdefaultaxes(); chart->settitle("simple line chart example"); qchartview *chartview = new qchartview(chart); chartview->setrenderhint(qpainter::antialiasing); qmainwindow window; windo...

Google chrome is changing css behavior -

i have div class called rectangle , wanted make hover effect transition using css, google browser dont let hover works when browser window in fullscreen. i'm using mac way. this how i'm doing hover css: .rectangle:hover { background: #4caf50; -webkit-transition: background 0.3s; -moz-transition: background 0.3s; -ms-transition: background 0.3s; -o-transition: background 0.3s; transition: background 0.3s; } it works in firefox , safari browser in fullscreen, google dont let work in fullscreen , dont know why. please me fix problem i'm not able find fix it. i have 3 advices you: don't use uppercase in property: background not "background" replace background more specific background-color the :fullscreen pseudo-class might useful in case

Android app crashes with setText in second Activity -

my app should show me in second activity string generate edittext in first activity after press button. package com.example.josue.sw22; import android.app.activity; import android.content.intent; import android.content.intentfilter; import android.os.bundle; import android.support.design.widget.floatingactionbutton; import android.support.design.widget.snackbar; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; import android.view.view; import android.view.menu; import android.view.menuitem; import android.os.bundle; import android.support.design.widget.floatingactionbutton; import android.support.design.widget.snackbar; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; import android.view.view; import android.view.menu; import android.view.menuitem; import android.widget.button; import android.widget.edittext; import android.widget.textview; public class mainactivity extends appcompatactivity {...

Java 8 streams intermediary map/collect to a stream with 2 values -

imagine have following working lambda expression: map<field, string> fields = arrays.stream(resultclass.getdeclaredfields()) .filter(f -> f.isannotationpresent(column.class)) .collect(tomap(f -> { f.setaccessible(true); return f; }, f -> f.getannotation(column.class).name())); i create stream 2 values before filter statement. want mapping still keep original value aside it. want achieve this: this.fields = arrays.stream(resultclass.getdeclaredfields()) //map <field, annotation> stream .filter((f, a) -> != null) .collect(tomap(f -> { f.setaccessible(true); return f; }, f -> a.name())); is possible java 8 streams? have looked @ collect(groupingby()) still without succes. you need pair holds 2 values. can write own, here code repurposes abstractmap.simpleentry : map...

android.view.InflateException: on writing a custom imageView -

i have custom imageview class below public class myimageview extends imageview { public myimageview(context context) { super(context); // todo auto-generated constructor stub } @override protected void ondraw(canvas canvas) { // todo auto-generated method stub paint p = new paint(paint.anti_alias_flag); canvas.drawline(0, 0, 20, 20, p); super.ondraw(canvas); } } and inside activity class oncreate methode defined as myimageview imageview; // works perfect when use imageview instead of myimageview @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); imageview=(myimageview)findviewbyid(r.id.image); bitmap dbitmap = bitmapfactory.decoderesource(getresources(), r.drawable.dinkan); bitmap bitmap = dbitmap.copy(bitmap.config.argb_8888, true); canvas canvas = new canvas(bitmap); paint paint = new paint(); paint.setcolor(color.black); ...

linux(Centos7) | I have two php.ini files -

i installed apm on linux (centos7) , think installed php again yum. i have 2 php.ini file in paths below. /usr/loacal/php/bin/php.ini (v5.3) /etc/php.ini (v5.4) php -v php 5.4.16 (cli) (built: jun 23 2015 21:17:27) /usr/local/php/bin/php -v php 5.3.27 (cli) (built: mar 3 2016 11:17:12) i have 2 versions of php on 1 server right now. rpm -qa | grep php php-pdo-5.4.16-36.el7_1.x86_64 php-tcpdf-6.2.11-1.el7.noarch php-tidy-5.4.16-3.el7.x86_64 php-xml-5.4.16-36.el7_1.x86_64 php-mbstring-5.4.16-36.el7_1.x86_64 php-cli-5.4.16-36.el7_1.x86_64 php-php-gettext-1.0.11-12.el7.noarch php-bcmath-5.4.16-36.el7_1.x86_64 php-gd-5.4.16-36.el7_1.x86_64 php-process-5.4.16-36.el7_1.x86_64 php-common-5.4.16-36.el7_1.x86_64 php-mysql-5.4.16-36.el7_1.x86_64 php-tcpdf-dejavu-sans-fonts-6.2.11-1.el7.noarch i think files installed php(v5.4) can remove these? can use yum command again below? yum remove php i'm afraid happens when that. please let me know how deal situation... ...

php - Symfony2 - doctrine connection configuration in bundle -

i have project uses additional bundle. bundle connects other database , need configuration database. i want have connections in 2 config files. main config: # root/app/config/config.yml: doctrine: dbal: default_connection: default connections: default: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: utf8 bundle config: # src/secondbundle/resources/config/config.yml doctrine: dbal: connections: secondbundle: driver: "%secondbundle.database_driver%" host: "%secondbundle.database_host%" port: "%secondbundle.database_port%" ...

postgresql - complete CMD command not running from java -

i running below query through java on postgres db using psql: psql.exe -u <user> -w -h <host> -d <db_name> -a -f <file> 2> "<path_to_file>\psql.log" initially, quite time java program did create file. ran problem, not overwriting log file. used file.delete() function after every time log file got created via java. now, java not creating log file reason. if run above manually in command prompt, runs absolutely fine, not via java code. can see command getting run in java log, not create log file when have removed file.delete() function i researched lot on not find solution. highly appreciated. its long code..so tell relevant part. i calling function thread. code below function: public static void saveacopyfiletoserver(int auditid,string filepath,string fname,string tb_name,string plpgsql_path) throws exception { map<string, string> env = system.getenv(); string plpgsql = "\""+plpgsql_pa...

jquery ui drag and drop - call function on drop -

i want alert('dropped'); execute when drop item div. drop event handler doesn't seem function. $('.dropme').sortable({ connectwith: '.dropme', cursor: 'pointer' }).droppable({ accept: '.button', activeclass: 'highlight', drop: function(event, ui) { var $li = $('<div>').html('list ' + ui.draggable.html()); $li.appendto(this); alert('dropped'); } }); here link fiddle: http://jsfiddle.net/8snsf/2195/ advice appreciated always. the issue because it's sortable() plugin has enabled drag/drop behaviour. therefore need use stop handler of plugin, not drop of draggable() . try this: $('.dropme').sortable({ connectwith: '.dropme', cursor: 'pointer', stop: function(event, ui) { var $li = $('<div>').html('list ' + ui.item.html()); $li.appendto(this); alert(...

Is autoscan of Spring Configuration classes possible by ApplicationContext? -

i have multiple configuration configuration classes (@configuration) classes in application in multiple maven modules. use single instance of annotationconfigapplicationcontext register these configuration classes. do have manually call , register classes shown below? applicationcontext ac = new annotationconfigapplicationcontext(); ac.register(conf1); ac.register(conf2); ... or have way autoscan configuration classes? looking componentscan @ applicationcontext level. there 2 ways can it. either scan using method on annotationconfigapplicationcontext example applicationcontext ac = new annotationconfigapplicationcontext(); ac.scan("com.sample.service" , "com.sample.dao"); ac.refresh(); alternatively register @ least 1 @configuration class using register method in turn uses @componentscan include classes specific locations

node.js - Error no.154 with gulp in windows 8 -

i'm been trying run gulp serve everytime throws error. have gone through many solutions given in stackoverflow nothing solved it. have installed lastest versions : node, git, npm, bower , gulp. paths have been assigned correctly. this error im getting the error got after installing admin

ios - Open a new TabBarController on clicking a tableview cell in swift -

i novice swift, how can open new tabbarcontroller on clicking tableviewcell. awaiting responses you have number of solutions: 1) if you're using storyboards, control+drag cell tabbarcontroller . 2) if want code , you're using uinavigationcontroller try push nav: let vc1 = self.storyboard!.instantiateviewcontrollerwithidentifier("myviewcontroller") as! viewcontroller self.navigationcontroller!.pushviewcontroller(vc1, animated: true) 3) if don't have uinavigationcontroller can present vc this: let vc1 = viewcontroller() //change class name self.presentviewcontroller(vc1, animated: true, completion: nil) 4) if you're using nibs (previous minor change): viewcontroller(nibnameornil: nil, bundleornil: nil) if want more resources, can check out link here

c# - The application named HTTPS://test113.onmicrosoft.com/FTP was not found in the tenant named test113.onmicrosoft.com -

i have authenticate application against azure ad. have created web api , added azure ad application section. changed manifest file, created web api , authenticated azure ad , created windows form, containing following code: private async void button1_click(object sender, eventargs e) { string authority = "https://login.windows.net/test113.onmicrosoft.com"; string resourceuri = "https://test113.onmicrosoft.com/ftp"; string clientid = "5177ef76-cbb4-43a8-a7d0-899d3e886b34"; uri returnuri = new uri("http://keoftp"); authenticationcontext authcontext = new authenticationcontext(authority); authenticationresult authresult = authcontext.acquiretoken(resourceuri, clientid, returnuri); string authheader = authresult.createauthorizationheader(); // don't in prod system.net.servicepointmanager.servercertificatevalidationcallback = ((s, c, c2, se) => true); httpclient cli...

Compilation of large Component Based C++ Project -

could point out sources can read compilation procedures large c++ projects build multiple components. the problem now, if modification in 1 of components, have build whole project scratch. is there way allows me build components in standalone manner, , when of them built, "join" them single binary? , if have modification in 1 of components, able build component, , link binary? thanks answers. regards, cristian you can use dll/library files. can create/test/build each component library refer these libraries in project.

c# - How to implement commenting system using ASP.NET repeater control -

i implemented facing 1 problem. repeater show comments according query database , there delete button showing in every item of repeater delete button should need appear @ item(comment) commented logged-in user. user can delete other user's comment, how avoid it. mean how hide delete button repeater results except logged-in user's comments?

Ext.Net - Change panel width from Javascript -

i change panel width size javascript. here code don't work: javascript code: <script type="text/javascript"> var extraexpandmap = function (pannello) { pannello.setwidth = 920; }; </script> asp.net code: <ext:panel id="panellazymap" runat="server" region="east" width="460" title="mappa" layout="fit" floatable="false" resizable="true" collapsed="true" collapsible="true" autoscroll="false" bodystyle="background-color:#ffffff;" marginspec="84 0 0 0" animcollapse ="false"> <headerconfig> <items> <ext:button id="btnexpandextramap" runat="server" icon="rewindgreen"> <listeners> <click handler=...