Posts

Showing posts from March, 2015

sphinx - when i am debug using gdb compiler ,can't able see the printed values in console window -

i've downloaded sphinx-2.2.5-release version ,installed successfully... steps:: ./configure --prefix=/home/syscon/documents/work/sphinx-2.2.5-release --with-debug sudo make clean sudo make sudo make install mysql -u root -p** tests -e "select * tests.documents" mysql -u root -p** tests < example.sql sudo ./src/indexer --all to debug searchd in console, sudo gdb -tui --args ./src/searchd --console once step has been done,it goes inside console window, break sendsearchresponse run void sendsearchresponse ( searchhandler_c & thandler, inputbuffer_c & treq, int isock, int iver, int imasterver ) { .... .... // serve response netoutputbuffer_c tout ( isock ); int ireplylen = 0; bool bagentmode = ( imasterver>0 ); cout<< "length" << endl; cout << ireplylen << endl;

Change ISO Date String to Date Object - JavaScript -

i stuck in weird situation , unfortunately,even after doing rnd , googling, unable solve problem. i have date string in iso format, 2014-11-03t19:38:34.203z , want convert date object new date() method. but when so, output is: var isodate = '2014-11-03t19:38:34.203z'; console.log(new date(isodate)); //output is: tue nov 04 2014 01:08:34 gmt+0530 (ist) the date passed of 3 nov,2014 , output 4 nov,2014 , it's because of gmt +5.30 of our local time(ist). so, there generic method can date object return date of nov 3,2014 . note : don't have issues timestamp. can change time string 0 sethours() method. thing want date object new date() having date of 3 nov,2014 . do not pass strings date constructor, notoriously bad @ parsing strings. ie 8, one, not parse iso 8601 format strings @ , return nan . it's simple write own parser: function parseisostring(s) { var b = s.split(/\d+/); return new date(date.utc(b[0], --b[1], b[2], b[3], b[4

java - JAXB default value for null elements when marshalling -

at time of marshalling of jaxb object want set defult value resulting xml. i not want use nillable=true generates empty tag unnecessary xsi:nil="true" , , not setting default value. instead want generate xml placeholder characters such '?'. use case : going build tool webservice testing. there need present entire request xml user (like soapui). use case : going build tool webservice testing. there need present entire request xml user (like soapui). the idea of place holder character isn't going work. example ? ok default value string, not int, boolean, or complex values (i.e. representing nested address information customer). instead want value reflects type. then have write large , complex reflection based code. assume not possible in case. this reflection code won't bad imagining. quick search reveal libraries populate objects "dummy" data. when hooking jaxb leverage marshaller.listener populate object o

SQL SERVER 2008 data Insertion Error -

create table groovyexps_tgt (empno smallint, firstname varchar(20) not null, midinit char(1) not null, lastname varchar(15) not null, salary_int int, salary_decimal decimal, salary_numeric numeric, salary_float float(9), salary_money money, salary_smallmoney smallmoney, birthdate datetime, hiredate_datetime datetime, join_time time, jointime datetime) insert groovyexps_tgt values(000010, 'christine', 'i', 'haas', 52750, 52750.45, 52750.45000045, 52750.45454, 52750, 52750, '1980-08-22', '2014-08-22 10:00:00.000000', '16:00', '2014-08-22 10:00:00.000000') error: msg 241, level 16, state 1, line 1 conversion failed when converting date and/or time character string. w

quantitative finance - getSymbols is throwing could not find function "importDefaults" errror -

i using financialinstrument package. when try call getsymbols function, following error. getsymbols("hsi", src='fi', dir=paste0(project_home,"/data/tick"), extension='rdata', + split_method='days', from='2014-11-01', days_to_omit="saturday") error in getsymbols.fi(symbols = "hsi", env = , verbose = false, : not find function "importdefaults" that because 'quantmod' package, 'financialinstrument' package depends on, excluded dependencies 'defaults' package, includes 'importdefaults' function. downloading 'defaults' package may help, try library(defaults) before running getsymbols.

php - access complex string data returned by curl -

i'm having trouble accessing data being returned via curl. data returned complex string. complex because uses curly braces , looks array. i tried access data array, eg. $var['key'] , gave me error: warning: illegal string offset here returned via curl: string(1422) "{"transactions": [{"transaction_id":143720,"currency_adjustment":20,"offer_id":null,"offer_name":null,"description":"cash out","timestamp":"11\/19\/14"}, {"transaction_id":143718,"currency_adjustment":-10,"offer_id":null,"offer_name":null,"description":"cash out","timestamp":"11\/19\/14"}, {"transaction_id":143716,"currency_adjustment":-10,"offer_id":null,"offer_name":null,"description":"cash out","timestamp":"11\/19\/14"}, {"transaction_id":

ios - UITableViewCell subclass, wrong height until scroll -

Image
i have custom uitableviewcell in use uiimageview. want cell able resize height according aspect ratio, based on imageview width, keep getting these constraints problems: "<nslayoutconstraint:0x7ffe13c14130 'uiview-encapsulated-layout-height' v:[uitableviewcellcontentview:0x7ffe117fb920(44)]>", "<nslayoutconstraint:0x7ffe13c15090 v:|-(0)-[uiview:0x7ffe13c11c10] (names: '|':uitableviewcellcontentview:0x7ffe117fb920 )>", "<nslayoutconstraint:0x7ffe13c150e0 v:[uiview:0x7ffe13c11c10]-(0)-[uibutton:0x7ffe117e8110]>", "<nslayoutconstraint:0x7ffe13c15190 v:[uibutton:0x7ffe117e8110(30)]>", "<nslayoutconstraint:0x7ffe13c151e0 v:[uibutton:0x7ffe117e8110]-(0)-[uiview:0x7ffe13c11d00]>", "<nslayoutconstraint:0x7ffe13c15910 uiview:0x7ffe13c11d00.height == uiview:0x7ffe13c11c10.height>", "<nslayoutconstraint:0x7ffe13c15960 v:[uiview:0x7ffe13c11d00]-(0)-[uibutton:0x7ffe13c0b00

file io - Python gzip.open .tell() has a linear increasing factor making it slow -

using python 3.3.5, have code looks like: with gzip.open(fname, mode='rb') fh: fh.seek(savedpos) line in fh: # work done savedpos = fh.tell() the work being done on each row quite taxing on system, wasn't hoping great numbers. threw in debug counter , got following result: 48 rows/sec 28 rows/sec 19 rows/sec 15 rows/sec 13 rows/sec 13 rows/sec 9 rows/sec 10 rows/sec 9 rows/sec 9 rows/sec 8 rows/sec 8 rows/sec 8 rows/sec 8 rows/sec 7 rows/sec 7 rows/sec 7 rows/sec 7 rows/sec 5 rows/sec ... which tells me off, put fh.tell() in debug-counter/timer function, making fh.tell() executed once second , got stable 65 rows/sec . am off shelf or shouldn't fh.tell() extremely quick? or side-affect of gzip alone? i used store file-position manually bugged out due different file-endings, encoding issues etc figured fh.tell() more accurate. are there alternatives or can speed fh.tell() how? my experience zlib (albeit using c rather

java - How can I call Test class ctor with params? -

i have unit test class , static main entry method. i know how run test class main method: public class singlejunittestrunner { public static void main(string... args) throws classnotfoundexception { string[] classandmethod = args[0].split("#"); request request = request.method(class.forname(classandmethod[0]), classandmethod[1]); result result = new junitcore().run(request); system.exit(result.wassuccessful() ? 0 : 1); } } is there way call test-calls ctor params , run tests? i took @ junit source code , came this: public static void main(string... args) throws classnotfoundexception { string[] classandmethod = args[0].split("#"); object[] parameters = new object[] {"constructor parameter"}; class<?> classname = class.forname(classandmethod[0]); string methodname = classandmethod[1]; request request = createrequest(parameters, classname, methodnam

Bootstrap for Rails dropdown box not working -

i reading michael hartl's ruby on rails tutorial. in chapter 8 implement sign in , sign out functionality. running bug in sections create "account" dropdown box. of tests pass , have followed code in book verbatim when hover on or click on "account" dropdown box nothing happens. here _header.erb file: <header class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <%= link_to "sample app", root_path, id: "logo" %> <nav> <ul class="nav pull-right"> <li><%= link_to "home", root_path %></li> <li><%= link_to "help", help_path %></li> <% if signed_in? %> <li><%= link_to "users", '#' %></li> <li id="fat-menu" class="dropdown"> <a href="#" clas

jquery - Enhancing performance of a gif background rollover -

i made cool rollover in css display animate gif when parent hovered. here's code : http://codepen.io/clemeeent/pen/oggzma problem have 40 .day that, playing animate gif behind circle @ time. i'm not sure browser/computer/connection can handle much. tried figure out solution : $( ".day" ).mouseenter(function() { $( ".play" ).append( "<img src="http://media.giphy.com/media/5vb7xqb7z3sce/giphy.gif">" ); }); but i'm definitly not sure better... if idea enhance code, appreciated. ps : gif sample, final result great :p as mentioned in comments above do css img { border-radius:50%; } .day { margin: 15px; height: 90px; width: 90px; float: left; position: relative; cursor: pointer; } .play { height: 90px; position: absolute; width: 90px; left: 50%; top: 50%; margin: -45px 0 0 -45px; z-index: -1; transition-duration: 100ms;

java - How to iterate multiple data from DataBase showing in UI in Single Frame? -

suppose have data in data base , retrieving using query. example: select * acsuserdetail "+useranme+"= '"+arg+"' " system.out.print(" firstname = " + rs.getstring("firstname")); this return 2 result i.e.: firstname = anurag firstname = arvind but when showing data in ui in jframe opening 2 frames having 2 details , if more details there number of frame open. may because data coming database coming 1 one not in single shot. want information consolidate in single frame. code ui is:- public uiforshowingdata(string data) { frame = new jframe("showing data"); frame.setdefaultcloseoperation(jframe.dispose_on_close); frame.setvisible(true); frame.setsize(300, 300); button = new jbutton("ok"); frame.setlayout(null); button.setbounds(250, 250, 40, 50); frame.add(button); system.out.println(data.length()); tx = new jtextfield(data); frame.add(tx); tx.setboun

regex - Dynamically Replace Substring With Substring Using PHP -

i have body of text stored string. there multiple substrings want replace substring of substring. typical substring want replace (note there multiple substrings want replace). $string = "loads of text [[gibberish text|text want]] more text [[gibberish text|text want]] more text [[if no separator remove tags]]"; $string = deletestringbetweenstrings("[[", "|", $string , true); deletestringbetweenstrings recursive function delete code between 2 substrings (including substrings) want first substring goes bit crazy after this. function deletestringbetweenstrings($beginning, $end, $string, $recursive) { $beginningpos = strpos($string, $beginning); $endpos = strpos($string, $end); if ($beginningpos === false || $endpos === false) { return $string; } $texttodelete = substr($string, $beginningpos, ($endpos + strlen($end)) - $beginningpos); $string = str_replace($texttodelete, '', $string); if (strpos($string, $beginning) &&

android - How addtag to the fragment in viewpager -

there several fragments in viewpager.i calling downloading file each fragment.so when downloading callback comes need update relevant fragment.so need find relevant fragment.how add tag fragment in viewpager ? default adding tag can overrides tag? from question, understood using fragmentviewpager many fragments , download content in each fragments. download callback received in acitivity , need update relative fragment. if assumption true, don't need go tagging, having fragments in fragmentviewpageradapter corresponding index. whenever download progress comes, can find relevant fragment using index guess.

Android Wear : Custom Notifications -

in handheld devices, custom notifications can displayed using remoteviews . remoteviews allows developer customise notification. what way same android wear? class should used override default notification ui own customised one? if want customize text only, can use spannablestring. allows change color, background, align of title/content text. if want create totally different notification have implement smth similar in wear project intent notificationintent = new intent(context, wearnotificationactivity.class); pendingintent pendingnotificationintent = pendingintent.getactivity(context, 0, notificationintent,pendingintent.flag_update_current); notification notification = new notification.builder(context) .setsmallicon(r.drawable.ic_launcher) // .setcontenttitle("customnotification") .extend(new notification.wearableextender() .setdisplayintent(pend

strtok - How to split nested deliminated strings in c? -

i wondering, how able split kind of strings. for example have following string: "80,8080,27001-27010,90" i first want split @ comma if there minus in substring want split , difference between 2 numbers converting them via atoi(). string want split list of ports, , want generate array of integer ports enumerated. strtok-function seems not suitable problem, there easy solution this? using of strtok_r example: substr1 = strtok_r(portlist, delim1, &saveptr1); while(substr1 != null){ substr2 = strtok_r(substr1, delim2, &saveptr2); substr1 = strtok_r(null, delim2, &saveptr1); } in particular case, can use strchr find point split token, thereby avoiding losing progress. another way use strtok_r , reentrant version of strtok doesn't have internal state. edit: strtok_r not part of standard c. part of posix.1-2001. think major compilers support it. in windows, corresponding function called strtok_s . way make portable #if defi

jquery - Javascript method synchronous call without callback and $.ajax -

welcome, i want call synchronous javascript method without callbacks. method post asynchronous. function somemethod() { var bean; //bean proxy object provide external library if(clicked_onspecial_field) { if(!bean.isauthorized()) { //here async call return false; } } //a lot of other instructions... } from 1 hand clicked_onspecial_field = false cannot put other instructions in callback. hand bean provide me proxy object. in case don't know in way can use $.ajax . could please help? i want call synchronous javascript method without callbacks. method post asynchronous if method inherently asynchronous, cannot call returns synchronously. that's outright impossible. see how return response asynchronous call? details. usually clicked_onspecial_field = false cannot put other instructions in callback. of course can! function somemethod() { var bean; //bean proxy object provide external libra

ms access - sql timeout on view -

we have access application in our office takes data sql server management studio 2012 different views (order tables joined other tables different companies) , put them in single access table statistics. problem when view becomes complicate, if execute view design gives error after 30 sec , access gives same error when open view access cannot transfer data. i changed timeout query , designers if execute query view have no problems but timeout has no effects on view. here view: select dbo.ordiniqdopolib.dataconsegna, dbo.ordiniqdopolib.fornitore, dbo.ordiniqdopolib.hotel, dbo.ordiniqdopolib.ordine, dbo.ordiniqdopolib.prodotto, dbo.ordiniqdopolib.numeros, dbo.ordiniqdopolib.costounitarios, dbo.ordiniqdopolib.costototales, dbo.ordiniqdopolib.consegnato, dbo.ordiniqdopolib.iddoctrasp, year(dbo.ordiniqdopolib.dataconsegna) anno, dbo.ordiniqdopolib.napoli, dbo.ordiniqdopolib.contrnap, dbo.regdoct.ndoc,

web2py - A single database value across multiple html input tags -

is possible have single database value (say, post/zip code) split across 2 html input tags (the first 4 digits in first, , last 3 in second). i using helper method of displaying form, far i'm aware, use 'raw' html achieve same thing (and if case, not mind @ changing view file have raw html). there way can use raw html, have 2 input tags postcode, , somehow combine values in controller? so model file: db.define_table( 'user_address', field('street_address', 'string', requires=is_not_empty()), field('city', 'string', requires=is_not_empty()), field('country', 'string', requires=is_not_empty()), field('postcode', 'string', requires=is_length(7)), ) this controller: def new(): form = sqlform(db.user_address) if form.accepts(request,session): response.flash = "form accepted" return dict(form = form) and view

proguard - Can't release without runProguard false in Android Studio -

i tried uploading apk googleplay because of this. you uploaded apk not zip aligned. need run zip align tool on apk , upload again. so added buildtypes using zipalign proguard in build.gradle buildtypes { release { runproguard true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.txt' zipalign true } } but got error code during making signed apk file. generate signed apk: errors while building apk, see messages tool window list of errors. so tried building signed apk setting runproguard false, worked. but i wondering why couldn't make signed apk proguard. check location , path key signature.

visual studio 2013 on msdn includes update 4? -

i have visual studio 2013 installed , download update 4 package of 5.8gb getting installation error "kb2829760lp digital signature of object did not verify." thought should download fresh visual studio 2013 package rather trying update have. searched on internet , cant find out if current visual studio 2013 download package available on visualstudio.com includes released update 4. trying ask is, if download fresh vs2013 installation package visualstudio.com still need update 4 seperately or updated? thanks it not clear got image (visualstudio.com or msdn subscription). nevertheless, both sites contain image downloads visual studio including update 4. can see directly on visualstudio.com download page or when in download area of msdn subscription.

How to plot a bifurcation diagram of a multi dimensional system in Matlab? -

i have question regarding following maxwell-bloch equations: de/dt =-0.1*e + 0.25*p dp/dt = -p+0.8*e*d dd/dt = -4*(d-lambda)+e*p how can plot bifurcation diagram of multi dimensional system in matlab. is possible plot multiple values of lambda? thanks lot!

sqlite3 - Android Loading data from sqlite database to populate UI spinners -

i developing mobile application acts access point dealing web application. ( uses native interface of android , makes calls remote server synchronizing data ) , keeps user oriented data on local sqlite3 database. in 1 of mine activities , data populated in spinners(not data) should loaded database ( reason data has configurable in main web application administration part wish of web application ) , it's not appropriate put data in usual string.xml string bundle. i want able again load data , when user changing local ( thinking of 2 languages support ). i have searched , read , may many articles , got confused , that's why asking question. ( have read using loader , not using cursorloader implementation pretty painful - refering loaderex project of commonsware , comments loaders framework , given fact usage of content providers me unnecessary , because don't intentd share database other applications , unnecessary boiler plate code around app ) . i want code wo

jquery - jQplot Multiple Series Duplicating X Axis Labels -

Image
i getting rather frustrated jqplot. can see in image, if plot single series it's spot on. add second series, same date on x axis, duplicates date label. i wondering how can prevent duplicating label on x axis, if date there form series 1, doesn't need display label again series 2. the function makes plots below: $.fn.plotchart = function(div,plots,ystring){ ystring = (typeof ystring == "undefined") ? '£%d' : ystring; var plot1 = $.jqplot(div,plots,{ highlighter: { show: true, tooltipaxes: 'both' }, seriesdefaults:{ rendereroptions: {filltozero: true}, }, axesdefaults:{ tickrenderer: $.jqplot.canvasaxistickrenderer, }, legend: { show: true, placement: 'outsidegrid' }, axes:{ xaxis:{ renderer: $.jqplot.dateaxisrenderer,

r - Logistic Regression in SAS -

Image
i have data below. i wish apply logistic regression. here response variable proportion of dead. here how analyzed data in r: dose <- c(1.6907, 1.7242, 1.7552, 1.7842, 1.8113, 1.8369, 1.8610,1.8839) total<- c(59,60,62,56,63,59,62,60) dead<- c(6,13,18,28,52,53,61,60) y <- dead/total lineer.model <- glm(y ~ dose,family=binomial(link=logit), weights=total) i want same analysis in sas. can please me that? here did in sas, thats not working. idea why data beetle_data; input dose total dead; y = dead/total; datalines; 1.6907 59 6 1.7242 60 13 1.7552 62 18 1.7842 56 28 1.8113 63 52 1.8369 59 53 1.8610 62 61 1.8839 60 60 ; proc logistic data=beetle_data; model y =dose/link=logit dist=binomial; run; based on this sas document (google "sas proc logistic binomial") looks should it: proc genmod data=beetle; model dead/total=dose / link=logit dist=binomial; based on this looks data above same, standard bliss (1935) data set r

How to search id into array and club together in php -

ok i'm stuck, i've been working on array merge finding id array .i want find subjectid array if found merge both array , calulate actual hour in time , time(calculate timing in between). array code.. actual array: array ( [eventlist] => array ( [0] => array ( [allday] => false [id] => {83ae8778-a604-46f1-94be-a045f2a9b548} [subjectid] => 2 [roomid] => 2 [fromtime] => 00:30 [totime] => 01:45 [plottingtype] => research ) [1] => array ( [allday] => false [id] => {2b1f7b32-6d44-4700-8c50-f030b94d41f6} [roomid] => 2 [fromtime] => 00:00 [totime] => 00:45 [plottingtype] => research

javascript - Getting page source from remote location almost works - just need to get the result into a variable -

having worked through previous postings , results of other searches, seem able want appears data object rather text can assign variable. i limited javascript in environment working in , want use string functions on returned data can search terms. this url format returns data object - result asked open or save text file: http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20%3d%20%22http://www.redrag.info/index.htm%22%20and%20xpath%3d%22*%22&format=xml&callback=cbfunc (you can replace url - http://www.redrag.info/index.htm - within example above 1 of own if wish) instead of opening text file, can use javascript document functions assign output variable? thanks. remove callback=cbfunc , define yours callback function. , can change format=json format=xml because simple handle. data , whatever want data $.getjson("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%20%3d%20%22http://www

class - Python :TypeError: this constructor takes no arguments -

when user enters email address, , program reads email , display according criteria (e.g yeo.myy@edu.co ), criteria: username yeo.myy domain edu.co i know "@" . this code class email: def __int__(self,emailaddr): self.emailaddr = emailaddr def domain(self): index = 0 in range(len(emailaddr)): if emailaddr[i] == "@": index = return self.emailaddr[index+1:] def username(self): index = 0 in range(len(emailaddr)): if emailaddr[i] == "@" : index = return self.emailaddr[:index] def main(): emailaddr = raw_input("enter email>>") user = email(emailaddr) print "username = ", user.username() print "domain = ", user.domain() main() this error got: traceback (most recent call last): file "c:/users/owner/desktop/sdsd", line 29, in <module>

node.js - How can I force namespace prefix usage? -

i'm trying consume soap webservice, wsdl kind of broken, have customization node-soap . the ideal soap envelope have one: <envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"> <body> <getimagesdefinition xmlns="http://services.example.com/"/> </body> </envelope> so far nodejs code have invoke service: var soap = require('soap'); var url = 'http://www.example.com/services/imagesizes?wsdl'; soap.createclient(url, function(err, client) { client.setendpoint('http://www.example.com/services/imagesizes'); client.getimagesdefinition(null, function(err, result) { console.log(result); }); console.log(client.lastrequest) }); i had set endpoint manually because broken in wsdl file the envelope when printing client.lastrequest this: <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http

sql - How range queries identified attribute name in analytic function oracle? -

prototype of range windows defined below function( ) on (partition <expr1> order <expr2> range between <start_expr> , <end_expr>) or function( ) on (partition <expr1> order <expr2> range [<start_expr> preceding or unbounded preceding] it's not mentioned range given attributes(x) how parser/evaluation engine identifies attributes(x) . select deptno, empno, sal, count(*) on (partition deptno order sal range between unbounded preceding , (sal/2) preceding) cnt_lt_half, count(*) on (partition deptno order sal range between (sal/2) following , unbounded following) cnt_mt_half emp order deptno, sal; in above sql query range applied on employee salary .how parser/evaluation engine identifies range given sal. since no mentioned sal between value . partition deptno defines groups order sal defines order of rows in each group range between [start] , [end] defines a window each row in each group. cannot specify clause unle

c++ - GetTempPath shows different user then current -

i using mfc on windows 8. when temp path, contains path different user account: c:\users\aace~1\appdata\temp the permission write file closed , cfile fails. account is: c:\users\dmitry i debug , launch application under account. problem? also, running on windows 8 1 user account. the documentation function describes how works: the gettemppath function checks existence of environment variables in following order , uses first path found: the path specified tmp environment variable. the path specified temp environment variable. the path specified userprofile environment variable. the windows directory. so, cause have mis-configuration of environment. check value of tmp , temp environment variables.

ruby - Is there special variable represent array itself in a each block for Enumerable? -

i have code this: array = [100, 90, 120, 100, 110] array.each_with_index.map |v, i| next if == array.size - 1 array[i+1] - v end and thought nicer if can write this: array = [100, 90, 120, 100, 110] array.each_with_index.map |v, i| next if == _.size - 1 _[i+1] - v end so want know if there special variable represent array in enumerator block. does know that? ruby has block scope, meaning, new variable define inside do/end block in scope , not accessible anywhere else. in irb, _ has special meaning , value of last expression executed. isn't case when executing ruby program, however. can define temporary _ variable inside block hold reference array: arr = [1,2,3] arr.each |x| _ = arr p _ #=> print [1,2,3] 3 times end p _ #=> undefined local variable other that, i'd consider monkey-patching array that's risky operation. of times questions these, however, if give better context of you're trying achieve, there's sim

windows - Izpack installer can't run without java -

i've created java application , , installer izpack , can setup application out problems when machine has jre , when there no jre installed on machine error indicating "windows cannot find javaw. make sure typed name correcly , try again." there way can pop friendly panel user tell him install jre , or there way bundle jre inside exe? i surfed internet till came across article talking izpack native launcher (building native windows installers izpack native launcher) ; provides 3 options needed , , these options : manually specify jre location download 1 internet install 1 provided packager (if available).

java - How do you send info from html to sql -

so trying fill out customer info, send customer info sql database table. have database made know right values going it. dont know how in. have posted code customer screen. <html> <head> <title>customer info</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> table, td { border: 5px blue; } </style> <script type="text/javascript" src=validator.js></script> <link rel="previous" href="index.html"> </head> <body> <h1 style="text-align:center;color:steelblue"> customer info </h1> <h5 id="errormessage" style="text-align:center;color:red"></h5> <form action=customerinfo.html method="post" onsubmit="return validatecustomerform(this)&quo

office365 - Connecting App for Office with ASP.NET MVC -

we created app office standard template in vs 2013. need app connect mvc project instead of default web project. so, replaced 1 mvc 5 web api 2 project. if run mvc project itself, runs in browser. the problem when start app office , expect see in task panel in word or excel. vs gives popup: “there deployment errors. continue?” if hit “yes” things work fine must wrong. nothing specific in output window , log 1 failed deployment. i had same issue. make sure select mvc project in “web project” property of app office. can access selecting app project in solution explorer , hitting f4 open properties window. also, make sure select valid web page source location in manifest, assume do, because “it works” if click continue on error popup.

database - How to read/convert DBF files so they can be used in Android? -

i have old dbase ii database file consists of around 70.000 rows 8 columns per row. comes down around 10 mb of data, nothing out of world. data ever read file, never added to, or updated. question is: what best approach utilize data in android platform (in optimal way possible)? should convert sql , import sqlite on device, or there other (better) alternatives? what performance of device? should data queried "continuously" (short intervals)? consume lot of resources? i have old dbase ii database file old? had hair when used dbase iii, , i'm not old have used dbase ii. use "prehistoric" adjective, "old" not justice. :-) that consists of around 70.000 rows 8 columns per row. comes down around 10 mb of data, nothing out of world no, bit on large side see in mobile realm today. what best approach utilize data in android platform (in optimal way possible)? convert sql import sqlite on device or there other (better) alte

Does Swift have an implicit Object Initializer, like in C#? -

in c#, have object initializers, so: person obj = new person { firstname = "craig", lastname = "playstead", }; does swift have this? as example, have code: var config = indicatesconfig() config.name = nslocalizedstring(localizable.folders, comment: "").uppercasestring config.style = .detailheader return config but along lines of: var config = indicatesconfig() { name = nslocalizedstring(localizable.folders, comment: "").uppercasestring style = .detailheader } thank you! edit: i'm not referencing explicit definition of class initialisers. please bear in mind syntax shown in c# example. not such. if create custom struct , swift will, under conditions, create default memberwise initializer close you're looking for. otherwise, don't think there's way implement such feature, since swift lacks with keyword new instance's scope. update: close can get, defining cu

javascript - How to create Master-Detail charts in highcharts-ng -

i using highcharts-ng creating dynamic charts in 1 of our angularjs application. highcharts-ng working simple chart. unable figure out way use highchart's master-detail chart through highcharts-ng module. below code written referring master-detail chart demo on highcharts website. renders master chart (not correctly though) not renders detail chart there no way pass subchart parent chart in highcharts-ng module. please have , suggest if there possibility create master-detail charts using highcharts-ng module. highly appreciated. jsfiddle : jsfiddle.net/hb7lu/8420/ html: <div ng-controller="chartctrl" ng-init="createmasterchart();"> <div id="container"> <highchart id="spectrum-detail" config="spectrumdetailchart"></highchart> <highchart id="spectrum-master" config="spectrummasterchart"></highchart> </div> </div> css: #container{pos

magento - Magmi product attribute_set changed to default on update -

i'm having issue magmi product import. on product creation import, correct attribute_set set products , ok on second import no attribute information (another csv), products attribute_set changed default. what doing wrong here? thanks

java - How to prime multiple blank records and then add data to them -

i've been struggling trying understand area in java, figured perhaps online it. basically, need "prime" 9,000 blank records (for bank) , choose enter data in specific areas (i.e. account number, name, balance). i know have use loops don't know should go. currently, can create 9,000 records, after entering data 1 record duplicates 9,0000 times, instead of putting record in 1 specific spot , leaving rest blank. import java.nio.file.*; import java.io.*; import static java.nio.file.standardopenoption.*; import java.util.scanner; public class writeemployeefile { public static void main(string[] args) { scanner input = new scanner(system.in); file myfile = new file ("c:\\users\\ussi\\desktop\\customerrecords.txt"); path file = paths.get("c:\\users\\ussi\\desktop\\customerrecords.txt"); string s = "000, ,00.00" + system.getproperty("line.separator"); string delimiter = ","; int account

d3.js: How to import csv data with float and string types -

very new d3 , javascript, have done 4 or hours trying resolve issue , haven't found solution yet. my .csv dataset i'd use has both string , float numbers (see sample set here: http://individual.utoronto.ca/lannajin/d3/pcadummyset.csv ), i'm having issues importing. d3.csv("http://individual.utoronto.ca/lannajin/d3/pcadummyset.csv") .row(function (d) { return { metric: d.metric, var: d.var, param: d.param, pc1: +d.pc1, // convert "pc1" column number pc2: +d.pc2, // convert "pc2" column number type: d.type }; }) .get(function (error, rows) { console.log(rows); }); where i've tried variations (for line 7 & 8) as: pc1: d.parsefloat("pc1"), pc1: parsefloat(d.pc1), pc1: d.parsefloat.pc1, etc. the main problem float characters (pc1 , pc2) in form 1.0e-02 rather 0.001, means can't use "+" operator convert data float. instead, have use par

find partial duplicated rows in a SQL table in IBM netezza database -

this question related previous question : error of finding distinct cobinations of muiltiple columns in ibm netezza sql table now, need find partial duplicated rows in table in sql ibm netteza aiginity workbench. the table : id1 id2 **id3 id4 id5 id6** id7 id8 id9 ny 63689 eiof 394 9761 9318 2846 2319 215 ny 63689 eiof 394 9761 9318 97614 648 645 ct 39631 pfef 92169 9418 9167 164 3494 34 ct 39631 pfef 92169 9418 9167 3649 7789 568 id3 id4 id5 id6 duplicated id1 = ny , id2 = 63689 id3 id4 id5 id6 duplicated id1 = ct , id2 = 39631 the result should be id1 id2 value ny 63689 2 ct 39631 2 update : need count partial duplicated id3 id4 id5 id6 each id1 , id2. not care columns of id7, id8, id9. i used sql query: select id1, id2, count(*) value ( select id1, id2, id3, id4, id5, id6 mytable group id1, id2, id3, id4, id5, id6 ) uniques

c# - combo box acces level -

i making pos system , , doing employee log, allows set information of employee working in store. want set combo box read following numbers: 1 , 2 , 3 , 4 - access level different parts of program. how make when 1 selected, employee access level variable turns 1? public employee_info() { initializecomponent(); } private void textbox4_textchanged(object sender, eventargs e) { int num; try { num = int.parse(textbox4.text); label1.text = num.tostring(); } catch (exception exc) { label5.text = "please enter number"; } } private void employee_info_load(object sender, eventargs e) { } private void button1_click(object sender, eventargs e) { string name = textbox1.text; int number = convert.toint32(textbox2.text); string emial = textbox3.text; } private void combobox1_selectedindexchanged(obje

c# - MS SQL Database data to .aspx page -

i'm front-end developer , i'm working on project need take data ms sql database , display data on .aspx page using html5. c# used on .aspx pages, if helps any. i don't know begin. i've tried doing research,but have not been successful. there server-side method need make connection? direction or advise appreciated. thanks! one tool asp.net entity framework. as quoted microsoft: "entity framework microsoft’s recommended data access technology new applications". have look: http://msdn.microsoft.com/en-us/data/ef.aspx

multithreading - How to (repeatedly) create and shut down multiple instances of python twisted factory / reactor? -

firstly, apologies title thread - worded better, i'm not sure know how! anyway... i have following methods start, , stop smtp server respectively: # ----------------------------------------------------------------------- def startserver(configname = 'default'): try: svrcfg = getserverconfig(configname) startlogger (svrcfg.find('logfile').text) portal = portal(simplerealm()) checker = inmemoryusernamepassworddatabasedontuse() checker.adduser("guest", "password") portal.registerchecker(checker) serverport = int(svrcfg.find('port').text) reactor.listentcp(serverport, consolesmtpfactory((portal, svrcfg))) thread(target=reactor.run, args=(false,)).start() # reactor.run() except twisted.internet.error.cannotlistenerror, e: errstring = "cannot start server, port " + svrcfg.find('port').text + " busy" lo

html5 - Bootstrap 3.2.0 Input Arrays inside Panel are not compatible with Firefox? -

i developing web application built off of bootstrap 3.2.0. working fine except input arrays not able edited within firefox 33.1 (safari 8.0 , chrome 38.0.2125.122 work fine). my settings page looks this: <!-- tab panes --> <form method="post" class="form-horizontal" role="form"> ... <div class="tab-content"> <div role="tabpanel" class="tab-pane" id="social"> <button type="button" class="social-add btn btn-success"><span class="glyphicon glyphicon-plus"></span> add social icon</button> <br/><br/> <!-- social icons --> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">social icons</h3> </div>