Posts

Showing posts from February, 2013

Admob Apple Mach-O Linker Error -

my source: _admobbanner = [[gadbannerview alloc] initwithframe:cgrectmake(0, 0, 320, 50)]; _admobbanner.adunitid = my_banner_unit_id; _admobbanner.rootviewcontroller = self; _admobbanner.delegate = self; [self.view addsubview:_admobbanner]; [nsarray arraywithobjects:gad_simulator_id, nil]; [_admobbanner loadrequest:[gadrequest request]]; add framework storekit.framework systemconfiguration.framework messageui.framework audiotoolbox.framework but when linking application see error: undefined symbols architecture i386: "_objc_class_$_asidentifiermanager", referenced from: objc-class-ref in libgoogleadmobads.a(gadidentifierutilities.o) ld: symbol(s) not found architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation) can provide pointers i've gone wrong? you need link against adsupport.framework provide asidentifiermanager .

c# - MySQL Syntax Error ASP.NET -

Image
good day! i'm trying figure out error i'm having. error: and here code: protected void accountgridview_rowediting(object sender, gridviewediteventargs e) { accountgridview.editindex = e.neweditindex; binddata(); } protected void accountgridview_rowupdating(object sender, gridviewupdateeventargs e) { int user_id = int.parse(accountgridview.datakeys[e.rowindex].value.tostring()); textbox txtusername = (textbox)accountgridview.rows[e.rowindex].findcontrol("txtusername"); updateuser(user_id, txtusername.text); accountgridview.editindex = -1; binddata(); } private void updateuser(int user_id, string username) { globalvars cn = new globalvars(); mysqlconnection connection = cn.connectdb(); connection.open(); string query = "update user set username = '" + username + " user_id = " + user_id + ""; mysqlcommand com = new mysqlcommand(query, connection); com.executenonquery();

How to use CSS&HTML to create a style like this Volume Ctrl bar? -

Image
volume ctrl bar i can click on little button , slide. you can use input:range <input type='range' value='46'> also see sliders @ codepen ana tudor http://codepen.io/search/pens?q=slider&limit=thebabydino

Android Wear Need to show notification on wear when the device is getting paired to wear -

please how can show notification on android wear paired device, weather notification google. thanks you can implement custom capability on phone. wearable listen capability wearablelistenerservice : override oncapabilitychanged . when phone connects wearable, capabilities provided reachable nodes (from watch) updated , oncapabilitychanged called. see documentation advertise , retrieve capability . advertise : (res/values/wear.xml) (mobile resources) <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="android_wear_capabilities"> <item>my_phone_capability</item> </string-array> </resources> listen changes on reachable capabilities : (wearablelistenerservice, service declared in manifest intent action bind_listener ) @override public void oncapabilitychanged(capabilityinfo capabilityinfo) { string mphonenodeid = pickbestnodeid(capabilityinfo.getnodes());

Android use vector drawable to replace text in button -

Image
currently have button looks this: what want able replace text vector drawable keep blue rectangle background: i looked doing cannot seem right. i tried following combination: <button android:id="@+id/deletebutton" android:layout_width="0dp" android:layout_height="50dp" android:src="@drawable/deletebtn24dp" android:backgroundtint="@color/primarybuttoncolor" android:layout_weight="1"/> however led blank blue button no drawable. can drawable replaces text? also support api levels start @ 16+. you have use app:srccompat="@drawable/deletebtn24dp" instead of android:src="@drawable/deletebtn24dp" . using imagebutton might better using straight button .

html5 - Canvas+Javascript water overlay -

Image
i'm trying make water waves in javascript on canvas there wrong. my idea making 3 waves different colors overdraw each other. not able figure out problem is. <!doctype html> <html> <style> <!-- 100% area --> body, html { height: 100%; width: 100%; } </style> <body> <canvas id="mycanvas" ></canvas> <script> //get window size var canvas = document.getelementbyid( "mycanvas" ); canvas.width = window.innerwidth; /// equal window dimension canvas.height = window.innerheight; // context var canvas = document.getelementbyid("mycanvas"); var context = canvas.getcontext('2d'); // variables var framecount=0; var n = 30; var positionxteiler= math.floor(canvas.width/(n-n/2)); var size = 50; var xoffset = 200; var colors = [];

apache flume log directory -

just begin learn apache flume. follow instructions on flume official getting started website: https://cwiki.apache.org/confluence/display/flume/getting+started almost fine after follow instructions on above link. not find log file afterwards. suppose log file under {flume.directory}/logs. idea find flume log files? here comes log4j.properties: flume.root.logger=info,logfile flume.log.dir=./logs flume.log.file=flume.log log4j.logger.org.apache.flume.lifecycle = info log4j.logger.org.jboss = warn log4j.logger.org.mortbay = info log4j.logger.org.apache.avro.ipc.nettytransceiver = warn log4j.logger.org.apache.hadoop = info log4j.logger.org.apache.hadoop.hive = error # define root logger system property "flume.root.logger". log4j.rootlogger=${flume.root.logger} # stock log4j rolling file appender # default log rotation configuration log4j.appender.logfile=org.apache.log4j.rollingfileappender log4j.appender.logfile.maxfilesize=100mb log4j.appender.logfile.maxbackupi

c# - Update textbox for each row in gridview on One Button Click -

in gridview have given textbox each row has corresponding button fetches value textbox , updates rows value in database. but want add 1 button on top in header template fetch value of textboxes , update rows. i have tried following code null reference exception @ "instance_id cell[0]" my code below. ` <asp:templatefield> <headertemplate> <asp:button id="button1" runat="server" text="button" onclick="button1_click" /> </headertemplate> <itemtemplate> <asp:textbox id="textbox1" runat="server"></asp:textbox> </itemtemplate> </asp:templatefield>

matlab - Save .Mat in Every Iterations -

im working on simulation dehumidification process, should save .mat file in every loop, program flowchart is: enter code here m=9:2:21 kk=1:ll jj=1:mm ii=1:nn ... ... ... end end end a=min(x-y) end for example mm=9 a=1 mm=11 a=2 ..., how can plot mm? , how can save .mat file in every mm iteration? thanks. blockquote %a=(7*1)matrix %9:2:21=7(number) if want save .mat-file each iteration thing need generate unique filename each iteration within loop. can done using format strings, instance in case like filename = sprintf('output_kk=%d_jj=%d_ii=%d.mat', [kk jj ii]); save(filename); you have option save specific variables adding them options save command. more string formatting i'd suggest check out sprintf documentation. i'm not sure whether efficient way it. depending on number , size of output variables you're interested in can create cell structure , save

java - Android Permission Real Time Seeking during installation -

how can check installation of new application phone through android application.also need scan permissions installing app seeking. inshort feature called on-install scan in cm security used , want implement in app,please me code. problem statement ,i have app should following 1.while installing new apps ,my app must seek permission installing app requires 2 have malicious app if contains predefined set of permission use package manager , concrete mask, example packagemanager p = context.getpackagemanager(); final list<packageinfo> appinstall = p.getinstalledpackages(packagemanager.get_permissions | packagemanager.get_providers)

html - Using ternary with href in AngularJS -

if type=1 , want url use variable {{vm.firstpath}} . else should use {{vm.secondpath}} . is doable using ternary? when tried doing not recognised: {{type==1? <a href="{{vm.firstpath}}">{{vm.name}}</a> : <a href="{{vm.secondpath}}">{{vm.name}}</a>}} you should use ng-href istead of href purpose. <a ng-href="type == 1 ? 'http://www.google.com' : 'http://www.facebook.com'">link</a> var app = angular.module('foo', []) app.controller('main', function($scope){ $scope.type = 1; }) jsfiddle : http://jsfiddle.net/nikdtu/b910258t/

Change the Number format as per the parameter pass in jasper report -

this question has answer here: how invert comma , dot when number formatting 1 answer my query is when user selects language german, number should displayed in format - thousand separator should , decimal separator should . when selected language english, number should displayed in format - thousand separator should . (standard) decimal separator should , (standard) can change number format per parameter change? it can done changing property setting particular field in ireport or can change directly in xml file. you can take refrance below code. <?xml version="1.0" encoding="utf-8"?> <jasperreport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jasperreports.sourceforge.net/jasperreports http://jasperrep

java - I don't exactly know how .equalsIgnoreCase work? -

i literally know , hang of java right , i'm writing program helps records patient'd id in hospital, i'll show whole code first,then, tell will, here code package hospitalsrecord; import java.util.*; import java.io.*; public class hospitalsrecord { public static scanner read = new scanner(system.in); public static arraylist namelist = new arraylist(); public static arraylist patientage = new arraylist(); public static arraylist disease = new arraylist(); public static arraylist datehospitalized = new arraylist(); public static arraylist roomnumber = new arraylist(); //adding patient function public static void addnewpatient () { //ask patient's name system.out.println("please enter patient's name:"); string patientname = read.next(); //ask patient's age system.out.println("please enter patient's age:"); int age = read.nextint(); //ask patient's illness system.out.println("please enter

How to send file as stream from python to a C library -

i trying use leptonica (c library) within python. library has pixread method takes absolute path image file parameter. i'm calling python this: leptonica = ctypes.cdll.loadlibrary("/path/to/lept.so") pix_image = leptonica.pixread("/path/to/image.jgp") however, call method pixreadstream that takes in file stream input parameter . in python program, have access image numpy array using opencv. question is there way pass image have numpy array in python program pixreadstream method in leptopnica c library takes file stream input parameter? roi #opencv image numpy array leptonica = ctypes.cdll.loadlibrary("/path/to/lept.so") pix_image = leptonica.pixreadstream(##any way pass roi here?##) creating leptonica pix structure numpy array can done without encoding data image format meant storage , channeling somehow via kernel file within same process. convert array data opencv rgba data , wrap enough leptonica create empty pix structu

mysql - PHP DATABASE - USERS -

how 1 allow user have privileges remove/add items products database? - users - -------------------------------------------------------------------- | name | surname | country | address | email | username | password | -------------------------------------------------------------------- - products - ------------------------------ | id | item | prize | number | ------------------------------ id: product id; item: product name; prize: product price; number: product availability. for simplest thing can try, can add user_type column in users table , use value in php code. example: <?php //select data users table first if ($row['user_type'] == "admin"){ //put here functions and/or objects want done under admin control } else{ //put here functions and/or objects want done under other users } ?> there many ways on how it. need think of one.

android - RecyclerView: toggling visibility of a children of all visible rows -

i have horizontal recyclerview. do, is, @ runtime, hide 2 textviews of items adapter. so, do, cycle through visible items, layout, , change visibility of textviews inside each children. you can see "simple layout" vs "complex layout" toggle. i know should retrieve recyclerview children through assigned recyclerview.adapter, best solution? thank lot help. my code: public viewholder(view v) { super(v); // logic here find children v.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // adapter here, loop visible children, , change visibility? // following line clicked item only: tvwind.setvisibility(tvwind.getvisibility()==view.visible?view.gone:view.visible); } }); } from above code, can change visibility of clicked item, not visible items. as discussed can achieved toggling visibility inside onbindviewholder() of adapter.

java - Can't retrieve correct time from database -

i have fields starttime , endtime in table type time. when try retrieve query gives wrong values of time if data table values correct. query follows : select ts.id, ts.serviceruleid, from_unixtime(ts.starttime, '%h %i %p') tempstrttime, from_unixtime(ts.endtime, '%h %i %p') tempendtime, ts.createdby, ts.createdon, ts.startdate, ts.enddate temporarytimeslots ts group ts.id why using from_unixtime etc. you using java, use sql.date object , correct result select ts.id, ts.serviceruleid,ts.starttime tempstrttime, ts.endtime tempendtime, ts.createdby, ts.createdon, ts.startdate, ts.enddate temporarytimeslots ts group ts.id

single page application - How to use JMeter WebDriver API programmatically from a java program.? -

i want conduct performance testing on single page application.i want programmatically .as know performance testing spa includes both client_end page loading,java script execution time , server_end response time, against asynchronous ajax calling. i used jmeter api programmatically running test script @ server_end following how create , run apache jmeter test scripts java program? this. now want run test script client_end using jmeter webdriver api programmatically.i follow how approach "end-client" performance testing on single-page (web) applications? doesn't give me enough information on how use jmeter webdriver api programmatically. so question how can use webdriver api programmatically? suggestion??? i suggest following use jmeter gui , script inside jmeter gui did. save script *.jmx file use following snippet automation // load existing .jmx test plan fileinputstream in = new fileinputstream("/path/to/your/jmetertest.jmx");

jquery - target sibling of 'this', with nth-child -

i'm trying target nth sibling of clicked item. target next element nth(4n+4), able insert new element after that, kind of on "new line". $("li").click(function () { $(this).next('li:nth-child(4n+4)').after('<li class="full">new full width item</li>'); }); it's .next('li:nth-child(4n+4)') doesn't seem work. it's bit hard explain, understand mean here: http://jsfiddle.net/hye7e/1/ this working fine, after() executed, when next li 4n+4 child. i.e. right start, work fine if click on 3 or on 7. right after clicked on 3, 7th 1 stop working , 6th 1 work instead, because 7 has become 8th element. a bit clumsy update: http://jsfiddle.net/hye7e/3/ $("ul li:nth-child(4n)").addclass("last-in-line"); $("li").click(function () { $(this).nextall("li.last-in-line").andself(".last-in-line").filter(":first").after('<li clas

javascript - Loading external page content in specific division -

i want display external page contents in specific divisions. have found solutions iframes etc nothing helps me much. <ul class="nav nav-pills"> <li class="active"> <a data-toggle="pill" href="#home">account details</a> </li> <li> <a data-toggle="pill" href="#menu1">wish list</a> </li> <li> <a data-toggle="pill" href="#menu2">edit account</a> </li> </ul> <div class="tab-content"> <div id="home" class="tab-pane fade in active"> ## want content of "/mtsite/page" ## </div> <div id="menu1" class="tab-pane fade"> ## want content of "/mtsite/page1" ## </div> <div id="menu2" class="tab-pane fade"> ## want co

swift - How to save NSWindow position for multiple screen? -

i setting autosavename window in ib. in windowcontroller of window doing following - override func windowdidload() { super.windowdidload() // implement method handle initialization after window controller's window has been loaded nib file. self.window?.setframeusingname("testwindowcontollerautosavename") } this simple possibly can be. works if use on single screen. if using multiple screens initial window position on main screen. doesn't remember screen app quit. have tried (with no luck) - override func windowdidload() { super.windowdidload() // implement method handle initialization after window controller's window has been loaded nib file. let framestring = self.window?.stringwithsavedframe if let _ = framestring{ self.window?.setframefromstring(framestring!) } } how correctly use setframeusingname method? help. this because uiviews embedded within u

How to configure spring boot jpa configurations for entities in intellij -

i have used spring boot , spring data jpa when created named query in entity see 'can't resolve symbol 'user'',i have tried in intellij.. how can resolve problem ? picture @entity @table(name = "users") @namedquery(name = "updaterole",query = "select u user u ") //that line public class user extends abstractpersistable{ @column(name = "user_name") private string username; @column(name = "password") private string password; @column(name = "first_name")

ios - I am facing this error " this class is not key value coding-compliant for the key tableView" . What am I doing wrong over here? -

Image
this question has answer here: what mean? “'nsunknownkeyexception', reason: … class not key value coding-compliant key x” 63 answers so, multi page application , whenever switch page uitable present in face error " setvalue:forundefinedkey:]: class not key value coding-compliant key tableview." got same error before cause forgot add numberofrowsinsection function after adding still facing same error. class workingquery: uiviewcontroller, uitableviewdelegate, uitableviewdatasource{ @iboutlet weak var tableviews: uitableview! override func viewdidload() { super.viewdidload() } override func didreceivememorywarning() { super.didreceivememorywarning() // dispose of resources can recreated } //tableview code var names = ["mark", "cloyd", "buck", "steve", "wallace"]

Bower install chartjs - bower invalid-meta Chart.js is missing "ignore" entry in bower.json -

im trying install chartjs bower. command using is bower install --save chartjs im getting following reply: bower not-cached https://github.com/nnnick/chart.js.git#* bower resolve https://github.com/nnnick/chart.js.git#* bower checkout chartjs#2.0.2 bower invalid-meta chart.js missing "ignore" entry in bower.json bower resolved https://github.com/nnnick/chart.js.git#2.0.2 i tried using -f did nothing. know how solve this? its solved. had bug directory did not show chartjs folder.

Getting error of "Can't find variable: _fbBatchedBridge" when launch react-native run-android -

Image
i created new react-native project , launch on iphone simulator successfully. want launch on android simulator genymotion on mac machine. got below error on android. did search , can verify npm server started , listened on 8081 port. set server ip , port on simulator clicking "dev settings" -> "debug server host & port device". still not working. there other place need check? guess simulator can't connect host machine don't know how configure it. after testing, solved problem updating genymotion latest version added android simulator android 5.0. previous using android 4.3 not working.

c - Returning the address of a structure -

this code working on , in function trace* readtrace(char* filename) have read file (that fills structure) , return address of trace structure. time , value of structure pointers don't know how it. #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <math.h> #define tmax 1000 #define nbpts 2000 #define dt 0.5 typedef struct { char comment[40]; int nbpts; float time[4096]; float value[4096]; } trace; void simutrace(int tmax, float dt, float params[], trace *unetrace) { printf("shkruani emrin e eksperimentit : \n"); scanf("%s", &unetrace->comment); int = 0; float v = 0, w = 0, dv = 0, dw = 0, t = 0; float = params[0], d = params[1], e = params[2]; while (t <= tmax) { dv = (a - v) * (v - 1) * v - w; dw = e * (0.5 * v - w - d); v += dv * dt; w += dw * dt; unetrace->time[i] = t;

I'm new to Java, what does it mean for while(t!=-1) [READFILE]? -

i'm new java , i'm learning how read file .txt. i've stumbled across numerous notes lecture , i'm wondering why has while(t!=-1) when i'm trying read file small , simple java code. thanks answers. :) edit: thank guys answer. understand -1 means end-of-file, loop continue until file read. have -1? kind of specific rule in java? thank you. import java.io.*; public class test2 { public static void main(string[] args) throws exception{ filereader inone = new filereader("myfile.txt"); int t=inone.read(); while (t!=-1) { system.out.print((char)t); t=inone.read(); } } } i guess talking loop reads file contents. usually looks like: while (int symbol = inputstreamref.read()!=-1) { // } inputstreamref inputstream subclass object. inputstreamref.read() - reads file, , returns -1 when end of file has been reached. while (symbol != -1) means end of file has not been reached , need continue reading file contents. updat

sql server 2008 - Calculate diffrences between values from diffrent rows in SQL -

i have table : month_date account cash 1 2222 5000 2 2222 6000 3 2222 7000 4 2222 10000 2 1111 5000 3 1111 7000 4 1111 8000 and desired output should : month_date account cash diff 1 2222 5000 na 2 2222 6000 1000/5000= 0.2 3 2222 7000 1000/6000= 0.16 4 2222 10000 3000/7000 = 0.42 2 1111 5000 na 3 1111 7000 2000/5000= 0.4 4 1111 8000 1000/7000= 0.14 without calculation of course. not accounts has data month 1, see account 1111 think of ranking them. i'm looking subtract , divide rows on partition of account. select month_date, account, cash, rank() on (partition month_date, account) order month_date rnk, diff = case when rnk = 1 'na' else ???? any suggestions how perform this? for before sql server 2012 select m.month_date, m.account, m.cash,

C# socket program auto close -

when use program socket range of ip address, it's closed time without message. program ends. how can fix problem? (it console project) public static void main(string[] args) { task[] tasks = new task[200]; (int = 0; < 200; i++) { tasks[i] = task.factory.startnew(() => runningthread()); } task.waitall(tasks); console.writeline("finish..."); console.readkey(); //..... } public bool socketip(string ip, int port) { autoresetevent arevent = new autoresetevent(false); socket socket = new socket(addressfamily.internetwork, sockettype.stream, protocoltype.tcp); if (socket != null) { socket.bind(new ipendpoint(ipaddress.any, 0)); socket.beginconnect(new ipendpoint(ipaddress.parse(ip), port), callback, new arraylist() { socket, arevent}); arevent.waitone(waittime); if (rv) socket.shutdown(socketshutdown.both); socket.close(); socket = null; } ret

spring - SpringMVC Hibernate + SQLite not creating database -

i trying use hibernate , sqlite in spring mvc project, have configurated project , when run on server, database not created , can't connect or use sqlite database. there no exception wthen server start , i'm using entity manager hibernate4. persistence.xml <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jee http://ww

reactjs - es6 setprops is not a function -

class mycomponent { constructor(props){ super(props); } render() { return <view /> } } class test() { constructor(props){ super(props); this.onclick = this.onclick.bind(this); } onclick() { this.my.setporps({ show: true, }); } render(){ return <mycomponent ref={ ref => this.my = ref }/> } } if trigger onclick function, cause: undefined not function (evaluating '_this3.progressbar.setprops({ disabled:true})') can me? lot! from react docs: this method deprecated , removed soon. method not available on es6 class components extend react.component. instead of calling setprops, try invoking reactdom.render() again new props. https://facebook.github.io/react/docs/component-api.html#setprops (also in example spelled setporps wouldn't work anyway) it looks tr

twitter - Encode error in python -

i trying parse twitter data. retrieved data , stored in file named ' twitterdata ' f = open('twitterdata','r') line in f: jsonline = json.loads(line) key in jsonline: print str(jsonline[key]).encode('utf-8') i getting error after using encode('utf-8') : print str(jsonline[key]).encode('utf-8') unicodeencodeerror: 'ascii' codec can't encode characters in position 0-17: ordinal not in range(128) drop str() , or change unicode() : print jsonline[key].encode('utf-8') or print unicode(jsonline[key]).encode('utf-8') in python 2.x, str() tries convert contents 8-bit strings. since you're passing unicode objects, uses default encoding ( ascii ) , fails, before .encode('utf-8') call reached. using unicode() redundant here if data you're getting text, useful if of is, say, integers, recommend latter.

Hold, unhold feature for Twilio call which is already running -

i've twilio call routed agent via taskrouter(task, reservation created, agent has accepted call) , agent needs hold, unhold feature same twilio call. can please provide best practice this? can en-queuing call workflow?if yes then, how should redirect same call same agent un-hold feature? please let me know if has code snippet available. i'm using php you can handle 1 of few ways basic process is: first, provide twilio twiml places call "hold" when you're ready, use callsid of call , rest api redirect live call . <?php // php helper library twilio.com/docs/php/install require_once('/path/to/twilio-php/services/twilio.php'); // loads library // account sid , auth token twilio.com/user/account $sid = "your_account_sid"; $token = "your_auth_token"; $client = new services_twilio($sid, $token); // object sid. if not have sid, // check out list resource examples on page $call = $client->account->calls->get(&q

javascript - How to highlight a particular date in jquery ui datepicker -

i doing project on task reminder user can enter tasks dates.for overview of user's task using jquery ui datepicker(inline).i want highlight dates given user. thank in advance!! try with $(function() { $("#datepicker").datepicker({ beforeshowday: function(d) { var = new date(2012, 3, 10); // april 10, 2012 var b = new date(2012, 3, 20); // april 20, 2012 return [true, <= d && d <= b ? "my-class" : ""]; } }); }); here example: http://jsfiddle.net/qaeuj/ see answer: highlight dates in jquery ui datepicker

c# - Reportviewer font stretched while print and print preview time also font broken -

Image
i have problem in rdlc report @ time of print , print preview time .while clicking show report button every font ending digit stretched , broken in c# windows base application.but application developed machine print clearly.why happens. client machine report snap shot image developed machine report snap shot image in rdlc report layout, try maximize width of fields. looks might due scaling/resolution , truncating it. so, ex: between up/down divider lines of each column, utilize full space (maybe less 1-2 pixels) , see if helps resolve. since totals typically expected larger (final rows), suspect issue. on totals, can see opening/closing balance chopping off 272.60 value. if can, widen columns , field widths of output.

qt - Layout problems when switch from QWidget to QGraphicsItem -

i'm switching timeline viewer qwidget qgraphicsitem, because qwidget heavy, got performance issues when there thousand of qwidgets. i need layout management. found qgraphicsitem light, did't support layout. should use qgraphicswidget, there many useful qgraphicsitem's subclasses, qgraphicswidget doesn't have them. think qgraphicsproxywidget isn't answer because slow when using qwidgets... so, there way have layout qgraphicsitem? or there better solution? qgraphicslayout , qgraphicslayoutitem looking for. http://doc.qt.io/qt-4.8/qgraphicslayout.html http://doc.qt.io/qt-4.8/qgraphicslayoutitem.html hope helps.

javascript - Undo / redo not working properly and painting after zoom not working properly too -

i trying implement paint bucket tool undo , redo functionality. issue undo , redo working first time, when undo redo multiple times, code fails. can me figure issue out? zoom working, painting after zoom not work correctly. complete code. can copy paste , work @ end. <!doctype html> <html> <head> <title>painitng</title> <style> body { width: 100%; height: auto; text-align: center; } .colorpick { widh: 100%; height: atuo; } .pick { display: inline-block; width: 30px; height: 30px; margin: 5px; cursor: pointer; } canvas { border: 2px solid silver; } </style> </head> <body> <button id="zoomin">zoom in<