Posts

Showing posts from August, 2015

ios - Dispatch and Delay between calls -

i'm making clone old game simon (a.k.a. genius, in brazil), 1 coloured buttons player needs press following sequence of colors. for testing, interface has 4 coloured buttons created array button outlets, easy access: var buttonarray:[uibutton] = [self.greenbutton, self.yellowbutton, self.redbutton, self.bluebutton] also, created array store sequence of colors var colors:[int] = [] when game starts calls function adds random number 0 3 (index on buttonarray), , add number colors array after adding new color color sequence, app needs show sequence user, can repeat it for that, calls playmoves function, uses loop run through colors array , change alpha button, simulating 'blink' func playmoves(){ let delay = 0.5 * double(nsec_per_sec) let time = dispatch_time(dispatch_time_now, int64(delay)) in self.colors{ self.buttonarray[i].alpha = 0.2 dispatch_after(time, dispatch_get_main_queue(), { self.buttona

javascript - Changed background color based on td number using ID -

i having trouble changing background color of table cell based on value. have made work using var elems = document.getelementsbytagname(td); but make check number id tag. reason because have multiple rows variable range of , bad (green or red) different. my javascript looks like: var elems = document.getelementbyid("cho"); (var i=0, m=elems.length; i<m; i++) { if (elems[i].innerhtml>7) { elems[i].style.background="#ef0401";} if (elems[i].innerhtml<=7) { elems[i].style.background="#4cb900";} } i tried looking up, have replace innerhtml children? here html <table class="medical"> <tr> <td class="type-txt bg-left"><span class="type-name">total cholesterol</span><span class="sm-font">a type of fat</span></td> <td class="bg-right" id="cho">80</td> </tr> <tr> <td class="type-t

atk4 - ATK Upload Addon -

i attempting add uploading interface site supports multiple-file selection , drag-and-drop uploading. filestore add-on has worked me in past, need more features supports. i found upload add-on developed romans here: https://github.com/romaninsh/upload the readme states add-on uses blueimp upload jquery widget , lists several features such filelist view , dropzone controller. however, when looked in source code add-on, didn't find classes of views described in readme or controller. tried following instructions under "stand-alone use" adding view_uploader element page, added empty div page. is add-on incomplete? or meant extended before can functional? if add-on isn't best tool job, there better way implement kind of enhanced uploader need on site? i author of new upload add-on. in fact incomplete, i've planned out , drafted features / readme haven't had time finish it. the goal here create view interact filestore / importfile, uses more mod

android ndk - Google Play Game Services integration fails with "Play Games callback indicates connection failure." -

i have integrated google game services ndk game using minimalist code example. when starting app, authentication fails in logs: v/gamesnativesdk( 7212): play games callback indicates connection failure. i/gamesnativesdk( 7212): ui interaction required connect google play. i/teapotnativeactivity( 7212): sign in finished result of -3 i/biplane ( 7212): onauthactionfinished i/biplane ( 7212): not logged in! i/teapotnativeactivity( 7212): fetching blocking i/teapotnativeactivity( 7212): -------------------------------------------------------------- i/teapotnativeactivity( 7212): fetching nonblocking i/teapotnativeactivity( 7212): -------------------------------------------------------------- i/teapotnativeactivity( 7212): achievement response status: -3 i've performed steps outlined in online documentation, including: created game service in google play developer console , linked 2 apps. linked app debug key linker app release key took app-id linked apps (same id both l

Does anyone know how to run the scala executable in Git Bash shell? -

i have installed scala on windows 7 system. when run "scala -version" windows command prompt, get: scala code runner version 2.11.4 -- copyright 2002-2013, lamp/epfl when run "scala -version" git bash shell, required swagger , other frameworks, get: error: not find or load main class files does know how run scala executable git bash shell? i'm guessing you've installed scala on c:\program files (x86) or c:\program files . far can tell, git bash has problems reading classpath if has spaces and/or "()" in it. if you're on win7 64-bit system, easiest thing is: edit system variables path find scala\bin entry replace c:\program files progra~1 or c:\program files (x86) progra~2 if you're not on 64-bit system, (which can't verify due not having one), you'll have escaping path isn't screwed spaces and/or (). edit: here's related play instead: play 2.0-rc3 -- error: not find or load main clas

ios - tableview segue to another view controller -

i new programming , hung on simple problem. using parse array in tableview. when row selected want segue search bar on view controller. segue works fine , tableview works fine can't seem objectid pass. #import "bookmarkviewcontroller.h" #import "parse/parse.h" #import <parseui/parseui.h> #import "viewcontroller.h" @implementation bookmarkviewcontroller @synthesize postarray; #pragma mark - view lifecycle - (void)viewdidload { [super viewdidload]; [self.navigationitem setleftbarbuttonitem:[[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemrefresh target:self action:@selector(refreshbuttonhandler:)]]; } - (void)viewwillappear:(bool)animated { if ([pfuser currentuser]) [self refreshbuttonhandler:nil]; } #pragma mark - button handlers - (void)refreshbuttonhandler:(id)sender { //create query post object current user pfquery *postquery = [pfquery querywithclassname

php - Add count to SQL query -

i have following sql query , php output being run on mysql database... $count0 = $wpdb->get_results(" select * wp_rg_lead inner join wp_rg_lead_detail on wp_rg_lead.id=wp_rg_lead_detail.lead_id wp_rg_lead.form_id = '46' , cast(date_created date) >= current_date - interval '7' day , field_number = '18' order value "); foreach ( $count0 $page ) { echo $repid_field . ' - ' . $page->form_id . ' - ' . $page->value . ' - ' . $page->lead_id . ' - ' . $page->date_created.'<br/>'; } this works great want add count when outputs line tells me how many of 'value' exists. i have had @ count function not sure add in $count0 = $wpdb->get_results(" select *, count(*) totalvaluecount wp_rg_lead inner join wp_rg_lead_detail on wp_rg_lead.id=wp_rg_lead_detail.lead_id wp_rg_lead.form_id = '46' , cas

multithreading - OpenCL - how to effectively distribute work items to different devices -

i'm writing opencl application have n work items want distribute d devices n > d , in turn each device can process elements of own work item in parallel , achieve sort of "double" parallelism. here code have written try , achieve this. first create event each of devices , set them complete: cl_int err; cl_event *events = new cl_event[devicecount]; for(int = 0; < devicecount; i++) { events[i] = clcreateuserevent(context, &err); events[i] = clsetusereventstatus(events[i], cl_complete); } each device has own command queue , own "instance" of kernel. then enter "main loop" distributing work items. code finds first available device , enqueues work item. /*---loop on available jobs---*/ for(int = 0; < numworkitems; i++) { workitem item = workitems[i]; bool found = false; //check device availability int index = -1; //index of found device while(!found) //continuously loop until free device fo

angularjs - Angular: How to prevent controller reload on state change -

i have settings view , settings subview: $stateprovider .state('sidemenu.settings', { url: '/settings', views: { 'maincontent': { templateurl: 'partials/settings/settings.html', controller: 'settingscontroller' } } }) .state('sidemenu.default-location',{ url: '/default-location', views:{ 'maincontent':{ templateurl: 'partials/settings/defaultlocation.html', controller:'settingscontroller' } } }) you can notice both use same controller: settingscontroller . when call main settings view $state.go('sidemenu.default-location'); reloads settingscontroller again. why? (i don&#

count - jQuery inside body tag only? -

is there way count children inside element using jqueru or javascript? i tried several methods like: var count = $(document.body).children().length or var count = 0; $(document.body).children().each(function(){ count +=1 }); and every single 1 counts elements outside of tag , scripts or styles! so there way count elements inside body tag? to number of elements inside body tag, try var btags = document.body.getelementsbytagname("*"); var count = btags.length;

java - Using multiple classes for commands, command not working? -

hopefully guys can me fix this. i'm sorta new java, , new bukkitapi. learn best going ahead , attempting projects, , doing tons of research when can't figure out. i've looked around, , cannot figure out why isn't working. i'm attempting make plugin, , utilizing multiple classes organization , cleanliness. i'm typing how should typed, , have been going off of this tutorial here. bit old, things might have changed. problem is, when run command, no errors yet doesn't anything. says "alj23 issued server command: /hello (which command temporary until fix this) in console, yet nothing happens. no message in chat, no nothing. no errors in console. it's suppose send player issued command message saying "hello there!" (also temporary right now.) don't know why works. i'm still learning, i'm doing blatantly wrong. might following bad practices or doing unneeded things, if so, amazing if point them out. my main class: package

python - Cumulative Sum of a list of numbers -

this question has answer here: how find cumulative sum of numbers in list? 15 answers i have checked other questions similar none of them seem answer problem. need write function returns cumulative sum of list of number. have doesn't seem work properly: numbers = [4,3,6] sums = [] def cumulativesum(numbers): in range(len(numbers) - 1): sums.append(numbers[i] + numbers[i + 1]) return sums print cumulativesum(numbers) ##[4, 7, 13] answers should come out this work, never accessing sum array, need in order increment values calculated , put numbers = [4,3,6] sums = [] def cumulativesum(numbers): sums.append(numbers[0]) in range(len(numbers) - 1): if == 0: sums.append(numbers[i] + numbers[i + 1]) else: sums.append(numbers[i + 1] + sums[i]) return sums print cumulativesum(numbe

ios - Parse set applicationId quitting -

i have app opens right away login/register page. everytime run it, error. exception breakpoint shows error in viewdidload statement. here is: override func viewdidload() { super.viewdidload() parse.setapplicationid("evh469wqjtgjbwvatysdepvjaetquqdimcyaqujc", clientkey: "4h9smitcwq1aaasvfsj3eluuowci3oteywmjrlxv") var currentuser = pfuser.currentuser() if currentuser != nil { self.performseguewithidentifier("homepage", sender: anyobject?()) } else { } } the breakpoint highlights parse.setapplicationid line. cannot figure out life of me. appreciated! update: crashes on phone, not in simulator... weirder

c# - Sharing .Net types in a wcf service with a no .Net client -

i develop webservice in wcf returning dataset . when create .net test app consume wcf can receive dataset , assign datagrid without problem. visual studio job me. but when partner trying consume wcf in c++ told me processes data xml , parsing string. i guess there should exist better way consumes data. because i'm not familiar c++, don't know how should work. should create class dataset row , return myclass array instead? now, on other hand if want receive dataset him? how create xml? or should receive xml string instead , parsing on side? edit: in case c++ under linux. the dataset .net data type won't have specific analogue in non .net languages. if c++ consumer using .net, in theory dataset should deserializable. for api, want use simple custom objects , collection types can serialized array. example, if dataset has schema contains column1 int column2 string column3 bool and forth, create custom class represent that: pu

java - Ignoring upper/lowercase strings -

my goal change form of word "java" in sentence "java".i've got done code won't read in mixed cases example:java, java,etc. know suppose use touppercase , tolowercase or equalsignorecase not sure how use properly. not allowed use replace or replace all, teacher wants substring method. scanner input=new scanner(system.in); system.out.println("enter sentence words including java"); string sentence=input.nextline(); string find="java"; string replace="java"; string result=""; int n; do{ n=sentence.indexof(find); if(n!=-1){ result =sentence.substring(0,n); result=result +replace; result = result + sentence.substring(n+find.length()); sentence=result; } }while(n!=-1); system.out.println(sentence); } } you allowed use touppercase() ? try one scanner input=new scanner(system.in);

.htaccess - RewriteRule for removing the ".html" extension gives "Internal Server Error" -

i have .htaccess file setup in webhosting , looks (i’m trying remove .html part of url): rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.html [nc,l] nothing works, no matter code use doesn't work, gives error looks : internal server error the server encountered internal error or misconfiguration , unable complete request. please contact server administrator, webmaster@(mywebsitehere.com) , inform them of time error occurred, , might have done may have caused error. more information error may available in server error log. additionally, 500 internal server error error encountered while trying use errordocument handle request. i have emailed web hosting service no good, please help. missing huge?

angularjs - The angular documentation says that restrict applies to attributes (A) and elements (E). The source code says (AC) - why? -

the angular documentation says restrict applies attributes (a) , elements (e). restrict string of subset of eacm restricts directive specific directive declaration style. if omitted, defaults (elements , attributes) used. e - element name (default) : <my-directive></my-directive> a - attribute (default): <div my-directive="exp"></div> c - class: <div> class="my-directive: exp;"></div> m - comment: <!-- directive: my-directive exp --> the source code says (ac) - why discrepancy, or misreading code? function ngdirective(directive) { if (isfunction(directive)) { directive = { link: directive }; } directive.restrict = directive.restrict || 'ac'; // here return valuefn(directive); } directives you create yourself restricted being used elements or attributes default. the registerdirective function in compile.js contains code relevant

How to count unqiue combinations of interactions between rows in excel? -

so i've running trouble can help, i'm trying model weather. im trying count number of times interactions happen between categoric data in excel, example data set: sunny sunny cloudy p-cloudy sunny rainy cloudy sunny sunny etc... so on first day sunny, second day sunny, third cloudy , forth. how count number of times each weather type changes, i.e. sunny sunny 2 sunny p-cloudy 0 sunny cloudy 1 sunny rainy 1 cloudy p-cloudy 1 cloudy sunny 1 cloudy rainy 0 etc.. any appreciated. row b c d e f g 1 today tomorrow 2 sunny =a3 sunny cloudy p-cloudy rainy 3 sunny =a4 sunny =countifs(a:a,$d3,b:b,e$2) =countifs(a:a,$d3,b:b,f$2) =countifs(a:a,$

xml - update the attribute name and element value -

i need update address address line 1 , value inside 1 jane place , save in variable. input dummy xml used stylesheet <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:xs="http://www.w3.org/2001/xmlschema"> <xsl:template match="/"> <xsl:variable name="request"> <customers> <customer name="address">1 doe place</customer> <customer name="state">oh</customer> <customer name="name">john</customer> <customer name="name">kevin</customer> <customer name="name">leon</customer> <customer name="name">adam</customer> <customer name="city">columbus</customer> </customers> &

html - Any way to set an image to anything but 100% of its native size in Outlook using CSS? -

i'm attempting develop email limited fluid resizing capability. know, bit of crap shoot, im giving try anyway because ive seen done. i'm stuck on 1 hangup- have 2 column email image features , text in each column. on mobile devices 2 columns stack on top of eachother. able insert image , have adapt fit parent, or @ least have outlook recognize when give class sets image @ defined width. right when render in outlook, image displayed 100% of native width , height, no matter css tricks try apply. love insight! <style> body { max-width:600px; margin:auto; font-family: arial, sans-serif; font-size: 12px; } img { height:auto; max-height:auto; width:100%; display:block } table { max-width:600px!important; border-spacing:0!important; border:none; } td { cellpadding:0px; border-spacing:0px; } tr { cellpadding:0px; border-spacing:0px; } .headline { padding:0px; font-size:30px; } .paragraph { font-size

php - Display content if row == 1 if row ==0 do not display -

so have log in script creates $_session based on username of user logging in. on page wish display content if row user has 1 in it. if has 0 in row, not display content. having issues here no matter i've tried, not display yes no matter user log in with. test1 = 1 test2 = 0 <? require_once 'dbinfo.php'; $sess = $_session['authuser']; $link = mysqli_connect($servername, $username, $password); if (!$link) { die('could not connect: ' . mysqli_error($link)); } mysqli_select_db($link, $database) or trigger_error(mysqli_error($link)); $acc = "select username admins username = '$sess'"; $result = mysqli_query($link, $acc) or trigger_error(mysqli_error($link)); ob_start(); while($row = $result->fetch_assoc()) { if($row['access'] == 1) { echo 'yes'; } elseif ($row['access'] == 0) { echo 'no'; } } ob_end_flush()

python - How to get the filter results in rest api -

i'm new python , jira rest api. need know how export results excel(in same format how manually). import jira.client jira.client import jira options = {'server': 'https"//atlassian.com'} jira = jira(options, basic_auth=('ss' , 'ss') issues = jira.attachment('filterid') however, fails export anything. me out i think question how turn issues excel object. first, there no way export excel jira directly according documentation. here link you. https://jira-python.readthedocs.org/en/latest/ second, need use modules turn attachment object excel. xlrd/xlwt. here link you. https://secure.simplistix.co.uk/svn/xlwt/trunk/xlwt/doc/xlwt.html?p=4966 https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html?p=4966 hope helps.

algorithm - Unexpected global variable values; skewheap implementation in c++ -

i trying implement skewheap data structures lectures. ignoring whether algotihm works, have problem code itself. on vs 2012 code runs returns unexpected results. during debugging value of global variable ( root ) changes unexpectedly. before entering insert(1) function (line 72) values of root expected them ( key=5 , right=null , left=null ). when stepping inside insert() , root value fields changes randomly. next, when reaching line 45: node *p = &input; root changes values ( input->key , null , null ). in dev c++ program shut down sigsev . in general sistuation similar, in print() , pointers left , right changes value unexpected values. reasons this? #include <iostream> #include <cstdio> #include <algorithm> using namespace std; struct node { int key; node* right; node* left; node(int _key, node* _right, node* _left) { key = _key; right = _right; left = _left; } }; node* root = null; node* uni

java - Heap Priority Queue Implementation -

i working on code involving heap implementation , seem getting dereferenced error in bubbleup method, in while loop line. may rather basic question, what's best way solve this? i've had trouble implementing removehigh method, meant remove highest element queue. public class heappriorityqueue implements priorityqueue { protected final static int default_size = 10000; protected comparable[] storage; protected int currentsize; public heappriorityqueue () { this.storage=new comparable[default_size]; this.currentsize=0; } public heappriorityqueue(int size) { this.currentsize=size; this.storage=new comparable[currentsize]; } public int size () { return currentsize; } public boolean isempty ( ) { if(currentsize==0) return true; else return false; } public boolean isfull ( ) { if(currentsize==default_size)

calculate average rating in sql server -

Image
this table: i want fetch records of vendor contain servicedescription "plaster" or skills "plaster" or in category "plaster" , want calculate averagerating of vendor. note:if there no review of vendor records should come. this query: select * userdetails u ,vendorincategory v ,categorymaster c ,review rv v.categoryid=c.id , u.id=r.userid , u.id=rv.vendorid , v.vendorid=u.id , ((u.servicedescription '%plaster%' ) or (u.skills '%plaster%') or (c.name '%plaster%')) here problem in above query not getting vendor review not there. but want vendor not contain review matches criteria. userdetails: id servicedescription skills 1 plaster plaster 2 construction construvtion 3 plaster plaster 4 null null(not vendor) 5 null null(not vendor) review id customerid v

reporting services - SSRS Report Generator -

i have problem on how output 1 on ssrs. want output this: item1 item1.1 item1.1.1 item2 itme2.1 item2.1.2 item2.1.2.1 item2.1.2.2 item2.1.2.3 item2.1.3 can accomplish if group rows? hope can me this. thank you. edited: this sample data: mbtc-ccws07242014-04 c0000211957smith, john 00000000100000007242014nonvat assistance employee j. smith vassistance 7972 1900207140 07222014000000001000000000000000000000000000000000000000000001000000lfc lf012014php mb104sa10 assistance 1110016520unreleased acib-mbtc cash in bank - metrobank 000000001000000000000000000000 aap accounts payable 000000000000000000000001000000 c0000052658dela cruz, juan 00000000043800007242014nonvat ssc advance

git - Add reviewers to gerrit -

i've read question id: gerrit add reviewers however, requirements little different. i have not given users "push" rights, hence git push tr:kernel/common head:refs/for/experimental%r=a@a.com,r=b@b.com,cc=c@c.com redundant me. i using git review -r, however, using this, though changes uploaded, not able add specific reviewer using command line or local config. there work around? gerrit's push permission controls can push e.g. refs/heads/*, not general use of git push command. example pushing refs/for/experimental in question should work fine you. if want continue using git review command (which oddly enough doesn't appear support selection of reviewers) have option of adding reviewers after you've uploaded change. use set-reviewers ssh command or /changes/<id>/reviewers rest endpoint .

Android - Vertically center button at the bottom of a toolbar (like Google Calendar) -

Image
i'm trying recreate google calendar event screen it's edit fab (see screenshot below), i'm not sure how approach it. i'm using this library fab

.htaccess - PHP file upload size limit not working even after changing configuration settings -

file 600 mb not uploading request getting crashed after changing configuration settings in .htaccess php_value post_max_size 4g php_value upload_max_filesize 3g php_value memory_limit 3g php_value max_execution_time 259200 this php_info() directive | local value | master value max_execution_time | 60 60 max_file_uploads | 20 20 max_input_nesting_level | 64 64 max_input_time | 60 60 max_input_vars | 1000 1000 memory_limit | 3g 128m post_max_size | 4g 8m can 1 me pls.

ios - How can i create curve UIView/UIImageView not with animation? -

Image
how can create uiview looks , subview same effect. after searching in web found can done calayer, not have enough knowledge on . please me. in advance. upto levels , understanding have done coding may helpful you.. if not please ignore it.. 1st create custom view new file next, need change class of viewcontroller's view property uiview our customview class. open mainstoryboard.storyboard , in document outline click on view icon. then, open identity inspector (option+command+3) , change class name customview. then add code in custom view - (void)drawrect:(cgrect)rect { // drawing code uiimage *imagerecipe =[uiimage imagenamed:@"statement_card_1.png"]; uiimageview *imgview = [[uiimageview alloc]initwithframe:cgrectmake(0 ,0 ,290, 200)]; imgview.image = imagerecipe; [self addsubview:imgview]; cgpoint secondpoint = cgpointzero; cgpoint point1 = cgpointzero; cgpoint initial = cgpointzero; uibezierpath *apath = [uibezierpath bezierp

javascript - Changing the name of a html class with for loop variable -

i have several of html class's incrementing in class name such as: <div class="chicken1"> <b></b> </div> <div class="chicken2"> <b></b> </div> <div class="chicken3"> <b></b> </div> i'm trying write loop loop through these class names, adding index end each class name , calling function in 2s delays. for ( var = 1; <= 3; i++ ) { settimeout(function() { myfunction(".chicken" + + " b"); }, 2000 * i); } however isn't working. fiddle the problem of settimeout() called within loop; have close on loop variable: for (var = 1; <= 6; ++i) { settimeout((function(i) { return function() { myfunction(".chicken" + + " i"); }; })(i), * 2000); } demo it uses function gets called immediately, passing value of i ; value retained until settimeout() fired.

rest - How download file using java spark? -

i want write simple rest api file download. i cant find docs understood need set mimetype='application/zip' response, not clear how return stream. http://sparkjava.com/ update: resolved here example code: public static void main(string[] args) { //setport(8080); get("/hello", (request, responce) -> getfile(request,responce)); } private static object getfile(request request, response responce) { file file = new file("myfile"); responce.raw().setcontenttype("application/octet-stream"); responce.raw().setheader("content-disposition","attachment; filename="+file.getname()+".zip"); try { try(zipoutputstream zipoutputstream = new zipoutputstream(new bufferedoutputstream(responce.raw().getoutputstream())); bufferedinputstream bufferedinputstream = new bufferedinputstream(new fileinputstream(file))) { zipentry zipentry = new zipentry(file.getname());

sql server - SQL Agent cannot access UNC share -

i have ssis package creates folder in unc share , creates file there (using script task). the domain account used ssis , agent has possible permissions in db computer , share computer. it fails there. i created test sql agent job creates backup of database in same location , fails (operating system error 5 - access denied). edit: above test example may irrelevant since backup operation executed sql server database engine , not sql agent (agent still schedules task). i cannot debug script task in ssis , therefore im not sure problem. i have managed fix problem. first problem lack of sufficient task activation/execution permissions in dcom config node in component services. permissions had set sql server integration services. the second problem fact unc path looked this: \\192.168.250.51\c$\folder\ i needed create share (visible) that: \\computer-name\folder\ also don't try map drives folders. won't work.

javascript - Can't find file, chart does not appear -

i have code : <script> var area = new morris.area({ element: 'revenue-chart', resize: true, data: [ {y: '2011 q1', item1: 2666, item2: 2666}, {y: '2011 q2', item1: 2778, item2: 2294}, {y: '2011 q3', item1: 4912, item2: 1969}, {y: '2011 q4', item1: 3767, item2: 3597}, {y: '2012 q1', item1: 6810, item2: 1914}, {y: '2012 q2', item1: 5670, item2: 4293}, {y: '2012 q3', item1: 4820, item2: 3795}, {y: '2012 q4', item1: 15073, item2: 5967}, {y: '2013 q1', item1: 10687, item2: 4460}, {y: '2013 q2', item1: <?php echo file_get_contents("../adminpanel/pagecounters/totalviewsdecember.txt")?>, item2: 5713} ], xkey: 'y', ykeys: ['item1', 'item2'], labels: ['item 1', 'item 2'], linecolors: ['#a0d0e0', '#3c8dbc'], hideh

System table or stored procedure in Netezza to get create-table-sql of a table -

i need extract create-table-sql of table created in database in netezza, using query executed program. if there system table, stored procedure or otherwise, let's me that, please let me know. highly appreciated. the create statements not saved in table, can query table structure system tables in database. start nformation_schema.columns: select * information_schema.columns table_name='tablename' all information on create parameters stored in system tables tables. dumping information table: exec sp_help 'tablename'

mysql - unable to insert details into table through INSERT query with PHP -

i have application form. when trying enter details through form error pop ups saying "duplicate field '' key 'empuser'" , whenever tried enter different username condition "username existed" executing. have tried possible solutions not rectify problem. appreciated. thank you. here code empdetails.php <!doctype html public "//w3c//dtdhtml4.01transitional//en""http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>employee details</title> <style> #r{ color:red; } #g{ color:green; } </style> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="empdetails.js" type="text/javascript"></script> </head> <body> <fo

database - Android SQLite - not able to create Table -

this question has answer here: when sqliteopenhelper oncreate() / onupgrade() run? 11 answers this extraction of mainactivity in want create database table public class gamedrive extends activity { databasehelper databasehelper; sqlitedatabase database; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_game_drive); getactionbar().setdisplayhomeasupenabled(true); databasehelper = new databasehelper(this); database = databasehelper.getwritabledatabase(); . . . public class databasehelper extends sqliteopenhelper { private static final string databse_name = "database"; private static final string table_name = "tripdata"; private static final string column_id = "_id"; private static final string column_typ = "typ"; p

Grails TagLib calling stored body from nested tag -

we setting generalized tag table views. i need build header cols , content cols. in order provide flexible output content cols want take use of tag body. otherwise use code attribute default output. the strange thing happens in cell tag: the first call //println body?.call(item:[id:4]) // "item 4" results in expected result. second call (wrapped in closure , temporarily stored in page scope ) //println body?.call(item:[id:4]) // "item" does not take use of provided closure params. as seems in cell tag println "${body.maximumnumberofparameters}" // = 1 and executed @ later point: println "${body.maximumnumberofparameters}" // = 0 anyone knows more situation or internals of groovypagetagbody? thx in advance. taglib: class pagecomponentstaglib{ def table = { attrs, body -> map model = [:] pagescope._v_cols = [] body() model << [columns:pagescope._v_cols] pagesc

jquery - Why are the images flashing? -

on page http://128.199.58.229/landingpage/ each image coded like <span class="tribeimg"> <img src="images/tribes/img.jpg"> <p class="lt-tribe-name">tribe name</p> </span> my css looks like .tribeimg img { opacity: 0.7; position: absolute; left: 0; top: 0; } .tribeimg .lt-tribe-name { opacity: 0.7; z-index: 11; color: white; position: absolute; left: 32px; bottom: 50px; text-shadow: 1px 1px 8px black; } i'm using jquery fadeto different opacity. $(document).delegate('.tribeimg', 'mouseover', function() { $(this).children('img').fadeto(333, 1); $(this).children('.lt-tribe-name').fadeto(333, 1); }); $(document).delegate('.tribeimg', 'mouseout', function() { $(this).children('img').fadeto(333, 0.7); $(this).children('.lt-tribe-name').fadeto(333, 0.7); }); this kind of works. on mouseout images flash. try moving mouse around exagg

java - Cannot connect to PostgreSQL database as 'localhost' -

i developing android application , i'm using postgresql bundled postgis. want use local database connecting via 'localhost' doesn't work, have tried alternative use '127.0.0.1' instead not working, getting following error: org.postgresql.util.psqlexception: connection refused. check hostname , port correct , postmaster accepting tcp/ip connections. using network's ipv4 adress works, cannot connect via localhost. how can fix that? pg_hba.conf looks like: ... # put actual configuration here # ---------------------------------- # # if want allow non-local connections, need add more # "host" records. in case need make postgresql # listen on non-local interface via listen_addresses # configuration parameter, or via -i or -h command line switches. # type database user address method # ipv4 local connections: host 127.0.0.1/32 trust host 192.

Powershell script calls other powershell script with read-host lines -

i have multiple powershell scripts, each of them has read-host lines, user can provide values script, example name of server or true/false in cases. ike create powershell script, call other scripts, question: there way main script fill in read-host values? or best way handle then? prefer not change current existing scripts already. stop trying re-invent wheel. powershell has ability prompt missing parameters, use read things server names. has ability prompt confirmation before doing dangerous: ps c:\> function foo-bar >> { >> [cmdletbinding(supportsshouldprocess=$true, >> confirmimpact='high')] >> param >> ( >> # target server >> [parameter(mandatory=$true, >> valuefrompipeline=$true, >> valuefrompipelinebypropertyname=$true, >> valuefromremainingarguments=$false, >> pos

c# - How to fix Javascript Timer In asp.net(Master Page concept) -

i trying add javascript timer in asp.net project, implemented , runing needed, if pressing key in disappering me. timer runing. js. code function mytimer(startval, interval, outputid, datafield) { this.value = startval; this.outputcntrl = document.getelementbyid(outputid); this.currenttimeout = null; this.interval = interval; this.stopped = false; this.data = null; var formels = document.documentelement; if (datafield) { (var = 0; < formels.length - 1; i++) { if (formels[i].name == datafield) { this.data = formels[i]; = formels.length + 1; } } } mytimer.prototype.go = function () { if (this.value > 0 && this.stopped == false) { this.value = (this.value - this.interval); if (this.data) { this.data.value = thi