Posts

Showing posts from September, 2011

c# - Visio 2010/2013 page re-layout doesn't work if the page has a container shape with at least one child shape -

i'm recursively traversing directed object graph build flow chart using visio 2010 automation (sdk). i drop shapes on page , create connectors, when layout flowchart visio misplaces bottom of diagram container shapes have @ least 1 child shape. this problem visio auto page layout exists if page laid out ui (i.e. "design" tab -> "layout" group -> "re-layout page" -> "hierarchy"). to reproduce error, in visio 2010/2013: create blank drawing add 2 basic shapes, "basic shapes" style sheet example, let's call them b1 , b2 reference. place b1 inch above b2. select b1. add b1 container shape, let's call c1. add b1 c1 select left container "insert" tab -> "diagrams parts" group -> "container" in toolbar. draw connector c1 b2. connector can added "home" tab -> "tools" group -> "connector" option in toolbar. right click connector ,

installshield - How to add a Scrollable text area to a custom Dialog box? -

i'm using installshield professional 2013, , i'm having troubles including scrollable text area in custom dialog box (like sdlincensee rtf dialog box). i have tried using normal text area displays raw text. there way add scrollable text area display contents of rtf file sdlicenseex rtf? i managed work around issue copying , renaming sdlicenseex followed writing function handle scrollable text area. if not sure if best way handle in installscript project, worked me.

sql - Update statement to move wrong values to correct column -

i have situation in pl/sql have table called 'gender' has 2 columns gender1 , gender2 . column gender1 supposed have males - value -m , gender2 supposed have female values -f. ever reason there f values in column gender1 , there m values in column gender2 . is there way in single update statement have values moved respective correct columns? i think update statement asking: update gender set gender1 = (case when gender2 = 'm' 'm' else gender1 end), gender2 = (case when gender1 = 'f' 'f' else gender2 end) gender1 = 'f' or gender2 = 'm'; however, don't understand data structure trying represent.

autofill - Having trouble getting vbscript to recognize an input area -

i'm new this, i'm trying write script fill out form use helpdesk issues in extremely busy area. i've tried various ways text field , scoured internet looking correct way it, either i'm searching wrong keywords or i'm blind. the specific field i'm trying manipulate below: input name="custom_ticket_form_field_2" type="text" style="width: 400px" value="" the area i'm having trouble with: option explicit dim objie : set objie = createobject("internetexplorer.application") objie.navigate "about:blank" objie.visible = true objie.navigate "http://xxxx/xxxx" until objie.readystate = 4 wscript.sleep 500 loop objie.document.getelementsby**????**("custom_ticket_form_field_2").value = "laptop" no matter how try identify(????) "custon_ticket_form_field_2" can't seem text end there. suggestions! you want: objie.document.getelementsb

javascript - Highcharts fill bar background -

hi guys have highcharts graph stacked bar , trying give chart effect being filled, thermometer. when chart draws red , gray bars push right. there way can set gray bar shows right away on page load, , red bar fills gray bar? thanks http://jsfiddle.net/jimbob25/l974t/ series: [{ name: 'null', data: [5, 69, 86, 75, 48], borderradius: 5, color: "gray" }, { name: 'values', data: [95, 31, 14, 25, 62], color: "red", borderradius: 5 }] update, first bar in following link http://jsfiddle.net/l974t/3/ you can see first bar grey, can make rest gray , fine, bars not scale based off of resolution here can do: add 1 more series, different stack (as background) - animation series should disabled (duplicated of gray one) change color right-hand series transparent and here working code: http://jsfiddle.net/l974t/4/ series: [{ name: 'null',

c# - Dataset inserts odd child records -

the scenery : dataset main , 2 child tables (sales, salesdetail, payments), working sql server 2008 r2, on windows server 2012. dataset calls different stored procedure each insert, update , delete operation, on each table. the error : routine works fine except once in while it: a)inserts child records not in original data table or b) inserts repeated child records. i've noticed error happens when restore production database development machine, run app , first transaction gets several details records weren't ones typed. second time restore database, error doesn't happen. the sql server logs show deadlocking when saving these transactions, rare. the routine updating is: (thanks bonnie advice on transactions: geek-goddess-bonnie.blogspot.mx ) namespace saleswincs { class class1 { sqlconnection conn; public int updatesales(dsetsales ds) { int32 _newid = 0; sqldataadapter da = null; sqldataadapter dadetail

c - Why does data i push into a queue not come out on the other end? -

i writing multithreaded communication interface 1 function (in main thread) pushes data queue (vxworks msgqlib ) , function in communication task, fetches data queue forward hardware interface. now, seems push data doesn't align fetch data (or vice versa). inserted debugging messages find out what's going on have failed find culprit far. code have: a little explanation. built functions so, insert message tag meta data before actual message i.e. each message insert 2 items queue. please don't worry "reply" part yet, still needs work on either side. i'm worried outgoing part of equation. the function pushes data queue (in application task): static status spiqwriteread_tdm(uint8 cmdlen, uint8 *cmd, uint8 retdatlen, uint8 *retdat) { uint8 bytesread; uint8 *msgtag[msgtaglen]={0}; static uint spi_init = 0; uint i=0; //assemble message tag msgtag[0] = 0x01; //frameid msgtag[1] = cmdlen/255; //msglen msb msgtag[2] = cmdlen%2

mysql - PHP Variable in SQL Statement -

i receive following error when use variable in sql statement: you have error in sql syntax; check manual corresponds mysql server version right syntax use near '1 = 86 id = 284' @ line 1 the code sql (which being used in php) is: for($l=0; $l<count($item); $l++) { $query = "update members set item" . $l+1 . " = ".$itemid[$l]." id = ".$_session['id']; $result = $mysqli->query($query) or die($mysqli->error); } i know error isn't coming session variable, if coming l , don't know why. thought did correctly. why receive error , how prevent it? your query mixing user data in without proper escaping: for($l=0; $l<count($item); $l++) { /* use sprintf avoid injecting arbitrary strings query */ $query = sprintf("update members set item%d=? id=?", $l + 1); /* prepare statement , bind specific user data values placeholders */ $stmt = $mysqli->prepare($query); $stmt->bind_param

javascript - Where in this should I add an AJAX call for a load throbber? -

here's function called when user clicks button generates shortened url , i'm wondering use ajax call throbber. takes few seconds , wanted use throbber in mean time. or end creating whole new function outside of 1 called when button clicked? haven't seen other examples code. new here, appreciate help, thanks. html suppose need link gif with... <img src="gif/loader.gif" id="loader"/> current js function i'm using generate short url function, takes couple seconds though think need call gif in there somewhere , rid of when callback successful? function getshare() { var s = document.createelement('script'); var browserurl = document.location.href; //alert(browserurl); if (browserurl.indexof("?") != -1){ browserurl = browserurl.split("?"); browserurl = browserurl[0]; } //alert(browserurl); var gifurl = document.getel

SQL: Need to get MAX values from one table and divide by the total number of rows in another table -

i have table bunch of scores lessons, on user user basis ------------------------ |uid |lesson_id |score | ------------------------ |1 |0 |20 | |1 |0 |25 | |1 |0 |15 | |1 |0 |40 | |1 |1 |70 | |1 |0 |10 | |1 |1 |20 | |1 |1 |55 | |1 |1 |55 | |1 |0 |5 | |1 |2 |65 | ------------------------ i have table of possible lessons can scored: ------------ |lesson_id | ------------ |0 | |1 | |2 | |3 | |4 | |5 | ------------ i need calculate maximum score each lesson in second table scores in first table, , take average of on number of lessons in second table: so, maximum scores scores table (for user 1): ----------------------- |lesson_id |max_score | ----------------------- |0 |40 | |1 |70 | |2 |65 | ----------------------- i need sum them: 175 ,

c# - Two webservices together in wp7 -

i want use result of webservice call in webservice call after it...but 2nd webservice getting called before result of 1st webservice.......i working on wp7 app..... phoneservice.webservicesoapclient register = new phoneservice.webservicesoapclient(); register.insertnewcollegecompleted += register_insertnewcollegecompleted; register.insertnewcollegeasync(newcollegename); register.insertnewcollegecompleted += register_insertnewcollegecompleted; register.insertdatacompleted += register_insertdatacompleted; register.insertdataasync(name.text, email.text, contact.text, int.parse(partnerid.text.substring(2)), student_no.text, pass.text, gender, branchid, yearid, collegeid, shirtreqd, accom); register.insertdatacompleted += register_insertdatacompleted; void register_insertdatacompleted(object sender, phoneservice.insertdatacompletedeventargs e) { messagebox.show("tt id is" + e.result); } void register_insertnewcollegecomplet

java - How to count same words in a string and get the index of the first word that is equal? -

Image
my task create static method named "dupwords" gets strings parameter , returns how many times word @ same string. catch is, need return two-dimensional array, have 2 columns , rows how many different sub strings in string... for example: "abcd xyz abcd abcd def xyz" this pairs [0][3] [5][2] [19][01] first pair means word "abcd" appears 3 times , state @ index 0 (and rest..) this image of two-dimensional array: (the text in hebrew can see drawing) i started something...you think way off :/ (its start) think didn't understand how deal two-dimensional array.. public static int[][] dupwords (string str) { string [] stringarray = str.split(" "); int countwords = 0; int index = 0; int [][] retarr; (int = 0; < stringarray.length; i++) { (int j = 0; j < stringarray.length; j++) { if (stringarray[i].equalsignorecase(stringarray[j])){ countw

sql - H2 Referential integrity constraint violation on update -

i use h2 integration tests , have strange behavior can't explain. here steps recreate : drop table if exists a; drop table if exists b; create table a(id int primary key, column1 varchar(255)); create table b(id int primary key, a_id int, column1 varchar(255)); alter table b add foreign key (a_id) references a(id); insert values(1,'foo'); insert b values(1,1,'foo'); create index idx1 on a(id,column1); alter table add column column2 varchar(255); update set column1='bar'; this last update generates following error : referential integrity constraint violation: "constraint_42_1: public.b foreign key(a_id) references public.a(id) (1)"; i've tried sames steps hsqldb success (no referential integrity constraint violation). workaround found make work h2 drop index before adding column , recreate same index again. is there reason why h2 complain violation, don't see, i'm not updating id column ? this bug in database engine.

javascript - Add the date on the top of each group of chats like in what's app -

i'm trying add date on top of messages sent , receive on particular day in chat app. instance: -----yesterday----- mike: hello jan: hi -----today---- eunice: help! i've been trying day fid: me too. lets ask help. i have written js calculate date , tried append top of messages sent daily. here i've done: add day of week classname messages sent on day use jquery select first element classname (day of week). firbase bomb yes sure i'm still learning though append html tag e.g today first div here js last10comments.on('child_added', function (snapshot) { var comment = snapshot.val(); var newdiv = $("<div/>").addclass("comment ").attr("id",snapshot.name()).appendto("#comments"); fb.api("/" + comment.userid, function(userdata) { comment.name = userdata.name; newdiv.html(mustache.to_html($('#template').html(), comment)); }); var outputtime = $("<span/>&quo

How to get a dictionary from a json file in Python? -

i got code implementing needing: import json json_data = [] open("trendingtopics.json") json_file: json_data = json.load(json_file) category in json_data: print category trendingtopic in category: print trendingtopic and json file: { "general": ["epn","peña nieto", "méxico","presidenciamx"], "acciones politicas": ["reforma fiscal", "reforma energética"] } however i'm getting printed: acciones politicas c c o n e s p o l t c s general g e n e r l i want dictionary being strings keys , got list value. iterate on it. how can accomplish it? json_data dictionary. in first loop, you're iterating on list of dictionary's keys: for category in json_data: category contain key strings - general , acciones politicas. you need replace loop, iterates on keys' letters: for trendingtopic in category: with below, iterates on diction

javascript - Jquery to change the value of an object -

how use jquery change value of object. have object , know selector, how change rgb value on click? i'm trying change pencolor. there data colors on 4 list items (yellow, green, blue, orange). when user clicks on yellow, js object changes object value? var signaturepad = new signaturepad(canvas, { minwidth: 2, maxwidth: 5, pencolor: "rgb(66, 133, 244)" }); var selectedcolor = $(e.currenttarget).data('color'); $('.initial').css('color', selectedcolor); and here's markup: <ul class="global-color"> <li class="yellow-pick" data-color="#f8c90d"></li> <li class="green-pick" data-color="#3dae49"></li> <li class="orange-pick" data-color="#e87425"></li> <li class="blue-pick" data-color="#009cc5"></li> </ul> jsfiddle demo you can change .pencolor property of signatu

c - Why am I segfaulting? -

i'm new c, attempting read contents of 1 file character character , output them stream. fopen() command commented out receive segfault (core dumped). i must run command: ./a.out < testwords.in > myout.txt execute file properly. here have far: #include <stdio.h> void main(char *filename[]) { printf("filename %s.\n",filename[0]); //get file based on string inputed file *fp=fopen(filename[0],"r"); //fetches our file read char ch; int linecount = 0; int wordcount = 0; int charcount = 0; //failed find/open file. null character. if (fp == 0) printf("woops! couldn't open file!\n"); //while not @ end of file, grab next char. else while( (ch=fgetc(fp)) != eof) { if (ch == '\n') //on newline { //prints (charcount,wordcount)\n linecount: printf("(%d,%d)%c%d:",charcount,wordcount,ch,linecount); charcount = 0; linecount += 1; } else printf("%c&quo

WChar_t set to null in C++ -

i have variable in wchararray form. want empty array , reuse it. how can set variable null? filename[1024] = l'\0'; is way empty array? you can use std::fill fill array zeros. std::fill(filename, filename+1024, 0); if have c++11 better use std::begin , std::end iterators call. std::fill(std::begin(filename), std::end(filename), 0); to initialize first time can use initializer. default value wchar_t 0 there's no need give values in brackets. wchar_t filename[1024] = {};

css - How to remove top border for one element in a list -

Image
i building navigation unordered list: <ul class="nav nav--block nav--banner multi-dropdown"><li class="first current"><a href="http://localhost/huayang/en/" title="home">home</a></li> <li><a href="news/" title="news">news</a></li> <li><a href="students" title="students">students</a></li> <li><a href="locations" title="locations">locations</a></li> <li><a href="contact" title="contact">contact</a></li> <li class="last"><a href="about-us" title="about us">about us</a></li> </ul> i want navigation like: notice how top border gone current navigation item? don't manage achieve. in order have top/bottom border apply whole navigation, have set ul element. in

python: simple boolean variable declaration after for loop isn't working -

i think title says here's code: for x in range(2, 10): my_button.push(button(10+50*x,470,45,20,(128,64,224),"button ".join(chr(48+x))) ispressed = false and result: jdd:my project me$ python testbutton1.py file "testbutton1.py", line 81 ispressed = false ^ i'm still learning , syntax can sneaky in language. not know. i'm not seeing did wrong. loop creating , pushing button objects onto linked list. as far case syntax errors, problem on line preceding error. you're missing close parenthesis here: my_button.push(button(10+50*x,470,45,20,(128,64,224),"button ".join(chr(48+x))) ) # added ---^ it's possible (and unknowable you), close parenthesis needs somewhere other end of line frankly, it'd nice if python included effect in traceback. like: syntax error on line 2 of statement inside parenthetical these errors crop far ofte

android - How to represent the call to a class through another class using an UML Class Diagram -

Image
in android, let's have 2 classes have common methods starting service, extract them helper class: the following diagram shows strange attempt represent it. have used transaction narrows. think activity diagrams, in uml-diagrams.org/class-reference.html , narrows called association navigability . that's why have used them try represent diagram. between helperclass , classservice have used normal association. between classes , service have used restriction (it informative, make more clear): am mixing class diagram activity diagram? update 1 : attempt represent component diagram: note: favourite explanation of how use component diagram this: https://www.ibm.com/developerworks/rational/library/dec04/bell/ update 2 : attempt draw class diagram suggested changes: update 3 : full class diagram. transaction arrows have been changed associations. user , system interactions have been removed (e.g. startswhenclick starts; startswhendetection starts): yes

laravel - Laravel4 Iframe URL with special chartecter throw NotFoundHttpException -

i'm using laravel4 project. it's ok when use this: <iframe src="{{url::to('/'). $video->path}}" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> but when use this: <iframe src="{{url::to('/'). $video->path}}&autoplay=0" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> the iframe return symfony \ component \ httpkernel \ exception \ notfoundhttpexception. how can fix this? please me out. smile i think doing query string wrong. if url of video is: yoursite.com/video1 , append &autoplay=0, url yoursite.com/video1&autoplay=0 not exist. change &autoplay=0 ?autoplay=0 see if works.

logging - Logstash indexer is scalable? -

i using logstash shipper -> redis -> logstash indexer -> elastricsearch -> kibana i understand redis , elastricsearch designed scalable. how logstash indexer, see on logstash main site show example of using single logstash indexer. would enough handle logs? , suggestion on having many instances of logstash indexer? if indexer bottleneck of such setup, add second logstash indexer on second machine same configuration, change redis source host , elasticsearch target host. when read same redis instance, use blocking reads ensure 1 redis entry read 1 indexer. as components, @ horizontal scaling (more machines), indexer can scaled onto bigger machine. if processing of single log events takes long, may try prevent work on indexer. e.g. done doing work on shipper side (using logstash filters) or having applications write json logs instead of "plain" loglines.

c# - FieldInfo.SetValue on a Nested Static Class using Reflection -

i struggling obtaining "object" able set value on nested class, , suspect going struggle how manipulate after set. example follows: public class registrydata { public registrykey rk; } public static class registrykeys { public static class username { public static registrydata data = null; public static string defaultvalue = "myusername"; } public static class password { public static registrydata data = null; public static string defaultvalue = "mypassword"; } } the following code uses reflection obtain data field, can not see how obtain "object" pass fieldinfo.setvalue(). static void doreflection() { type type = typeof(registrykeys); type[] nestedtypearray = type.getnestedtypes(bindingflags.public | bindingflags.static); foreach(type t in nestedtypearray) { fieldinfo field = t.getfield("data"); // obtain data field // issue 1:

Show private video with api google - From PHP? -

i show private videos youtube channel on website. i have logged in , got information videos, can't display them. if try show iframe done, i'm not allowed since video private. require_once 'zend/loader.php'; // zend dir must in include_path zend_loader::loadclass('zend_gdata_youtube'); zend_loader::loadclass('zend_gdata_authsub'); zend_loader::loadclass('zend_gdata_clientlogin'); $httpclient = zend_gdata_clientlogin::gethttpclient( "pepito@gmail.com", "pepito222", 'youtube' ); $yt = new zend_gdata_youtube( $httpclient, null, null, "ai39si4z-hqxkpxfary5xi3ypkoo684thf0jccufnz6mp0k_swsssss8zvxjvtpmkoqmko4xwdqkutjqyhu2ougqure2g" ); $playlistlistfeed = $yt->getplaylistlistfeed("pepitochannel"); //var_dump($playlistlistfeed); exit;

c# - Difference CLR and CLI and how to call those from pure C -

could tell me difference between clr , cli in it's basic functionallity important 1 of them better? all got far using iclrruntimehost interface not allow me return else int , allowed parameter lpcwstr (see executeindefaultappdomain ) at point wondering if 1 could/would allocate memory e.g. struct in c program, give pointer lpcwstr string executeindefaultappdomain , translates pointer struct on other side work on struct . don't how 1 can work limitation of signator each function: int fncname(string param); i took @ this tutorial don't how calling c++/cli c program works , how return complex objects or more complex int . and please show me how can use cli within c? can't seem find lines of code show how work. you can pass , return complex data in cli. cli intermediate layer. when pass data managed code(.net) native code (c,c++) need intermediate layer take responsibility of managed native object , vice verse conversation because manag

javascript - Search object of objects for array value match -

given array parameter ary ["value", "value2"] i want loop through object of objects find match both array values. i've tried such: function findmatch (ary) { storagearray = []; mykeys = []; myvalues = []; (var = 0; < ary.length; i++) { (obj in object) { (key in object[obj]) { if (ary[i] in object[obj]) { mykeys.push(key); myvalues.push(object[obj][ary[i]]); } } } storagearray .push(mykeys, myvalues); return storagearray; } var object = { "subobject" : { 'key' : 'value', 'key2' : 'value2', 'key3' : 'value3' }, "subobject2" : { 'key4' : 'value4' }, } goal: able return k : v pair each match of value in ary meaning... since ary has value , value2 ... want return match object of key : value , key2 : value2 . so far a) isn

html - How do I multiply values in PHP? -

i trying find basic input user enters 1 number , second number , multiplies it. i got work without isset function, trying echo out error line when page first starts up. if see input named, name , name2 call them in php. original code did not use isset , worked got error before input. php code: <html> <style> <?php include 'style.css';?> </style> <body> <form method="post"> <p> enter value 1:<input type="text" name="name"> <br> <p> enter value 2:<input type="text" name="name2"><br> <input type="submit" value="send"> </form> <br> <h3>your input:</h3><br> <?php if (isset($_post['name'])) && (isset($_post['name2'])){ $num=$_post['name']; $num2=$_post['name2

How to Handle Flex grid with selenium web driver? -

how handle flex grid selenium web driver? right using sikuli api (image processing) not solution. if have solution please give step wise answer have tested. in order able automate flex application need add instrumentation features compiled swf. can done using loader application, applies instrumentation, or compile in application intending automate. webdriver communicates these automation-stubs , able take full control of application. here description of general automation concepts: http://help.adobe.com/en_us/flex/using/ws2db454920e96a9e51e63e3d11c0bf69084-7ec5.html article should explain actual steps needed selenium2 webdriver: http://www.blackpepper.co.uk/driving-a-flex-application-via-selenium-2-webdriver/

Joomla routing engine -

i have written custom landing page want incorporate website. website using joomla cms. when type utl www.mysite.com/mylandingpahe.php 404 becuse joomla ruting engine kiks in , searches article in db.. this skeleton of landing page (basic contac form): <?php $to = "somebody@example.com, somebodyelse@example.com"; $subject = "html email"; $message = " <html> <head> <title>html email</title> </head> <body> <p>this email contains html tags!</p> <table> <tr> <th>firstname</th> <th>lastname</th> </tr> <tr> <td>john</td> <td>doe</td> </tr> </table> </body> </html> "; // set content-type when sending html email $headers = "mime-version: 1.0" . "\r\n"; $headers .= "content-type:text/html;charset=utf-8" . "\r\n"; // more headers $headers .= 'from: <webmaster@exampl

java - GWT with pure js/html UI -

we using gwt in our web java project implementing client ui , client business logics. we've chosen because it's convenient write in java (and avoid duplicated business objects). brief exploration of gwt docs/tutorials/blogs showed has built-in support css, i18n, browsers , has own marking html-like language (uibinder). so we've chosen gwt , ok until we've decided outsource front-end development. it's hard find experienced front-end freelancer gwt knowlenge, have ask them develop html+js code , convert gwt .ui.xml pages ourselves. it's error-prone , routine. gwt generates html itself, therefore applying css-s revealed tough issue. gwt creates additional div-s, tables , on. resulting html looks ugly - 2 pixels left of expected position, 3 pixels right , on. so thinking of rewriting al ui in pure js+html , using gwt client business logic , client-server interaction. the question is: there libs/frameworks simplifying dealing js elements gwt? , second

Need to add comma after every 3 digits using php -

i using cms - megento. want display price value in following format : add comma after every 3 digits. for example : $price = 987536453 ; need print 987,536,453. try str_split $price = 987536453; $price_text = (string)$price; // convert string $arr = str_split($price_text, "3"); // break string in 3 character sets $price_new_text = implode(",", $arr); // implode array comma echo $price_new_text; // output 987,536,453

java - Simple Key Listeners -

alright, i'm making simple pong game first real java project. "racquet" on bottom of jframe works , all, except motion part. need able read input keyboard. know can done through keylistener (i think) method; , java documentation website tells me can bind keys actions. way efficient/easiest; , if so, what's simplest way implement it? realize isn't simple if(keypressed == vk_left) but i've been having terrible time trying figure these dang things out. please? key bindings preferred method , tend less trouble some inputmap im = getinputmap(); actionmap = getactionmap(); im.put(keystroke.getkeystroke(keyevent.vk_left, keyevent.ctrl_down_mask), "left"); im.put(keystroke.getkeystroke(keyevent.vk_right, keyevent.ctrl_down_mask), "right"); am.put("left", new abstractaction() { @override public void actionperformed(actionevent e) { // code go left } }); am.put("right", new abstractac

webkit - Can't combine CSS Sprite and Background Gradient in Chrome/Safari -

this used work fine, gradient doesn't work in webkit. seems fine in firefox. can check if i'm setting incorrectly. don't pay attention images. gradient can't render. ideas please? jsfiddle: http://jsfiddle.net/udxug/2/ -webkit-gradient it's due old syntax, webkit/blink allows using vendor-less value. generally should use :pseudo-element --> http://jsfiddle.net/udxug/6/ anyways here's code works. works image .create { border: 1px solid #63ac5c; background: #d9ead8 url('http://tinyurl.com/mezxsk6') no-repeat 0px -10px; background: url('http://tinyurl.com/mezxsk6') no-repeat 0px -10px, -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dbe8d9), color-stop(100%, #bcd7b9)); /* safari 4+, chrome 2+ */ background: url('http://tinyurl.com/mezxsk6') no-repeat 0px -10px, -moz-linear-gradient(top, #dbe8d9, #bcd7b9); background: url('http://tinyurl.com/mezxsk6') no-repeat 0px

java - How to open a new page in the same windows in javafx -

i developing project in javafx using netbeans ide. want open new page in same window. how ? provide code below. don't included import statements here. in actual code. package welcomepage; public class welcomepage extends application { @override public void start(stage stage) { // use border pane root scene borderpane border = new borderpane(); border.settop(addvbox()); border.setleft(addvbox1()); scene scene = new scene(border,700,450); stage.setscene(scene); stage.setresizable(false); scene.getstylesheets().add (welcomepage.class.getresource("welcomepage.css").toexternalform()); stage.show(); } private vbox addvbox() { vbox vbox = new vbox(); vbox.setpadding(new insets(5, 12, 5, 20)); vbox.setspacing(10); // gap between nodes //vbox.setstyle("-fx-background-color: #999999;"); image image = new image(getclass().

java - Compile failed when running a lucene example -

after fixing error tools.jar , junit.jar not found (thanks stack overflow) tried compile example given in "lucene in action" book. when compiled getting error. can tell error getting , how fix it? total time: 0 seconds e:\luceneinaction>ant indexer buildfile: e:\luceneinaction\build.xml check-environment: compile: [javac] e:\luceneinaction\build.xml:66: warning: 'includeantruntime' not set, defaulting build.sysclasspath=last; set false repeatable builds [javac] compiling 104 source files e:\luceneinaction\build\classes [javac] e:\luceneinaction\src\lia\analysis\analyzerutils.java:3: warning: [d eprecation] assert in junit.framework has been deprecated [javac] import junit.framework.assert; [javac] ^ [javac] e:\luceneinaction\src\lia\handlingtypes\html\nekohtmlhandler.java:18 : error: package org.apache.html.dom not exist [javac] import org.apache.html.dom.htmldocumentimpl; [javac] ^ [javac] e:\luceneinactio

startup - Is there a backdoor to AX? AX 2012 R2 Class Application startupPost method customized code error abort AX client -

ax 2012 r2 class application startuppost method customized code error abort ax client. how enter ax again? can't login again correct wrong coding because of fatal error. "microsoft dynamics ax client has stopped working. a problem caused program stop working correctly. windows close program , notify if solution available." i cannot enter ax anymore! why? because put wrong code in class application startuppost method // no sys code must exist in method // if need startup command, in class sysstartupcmd void startuppost() { // <gth> args args = new args(); #isocountryregioncodes if (hasgui() && isrunningmode() && !sysmodelstore::isinstallmode() && syscountryregioncode::islegalentityincountryregion([#isoth]) && isconfigurationkeyenabled(configurationkeynum(taxthailandgovcertification))) { taxthaigovcertificationhelper::promptsysaboutform(false); } // </

android - Turkish characters are not getting set in the Textview in the custom Listview Adapter -

thanks in advance please forgive me if mistaking explain problem correctly. i working on turkish language application . i have list view , have defined custom adapter list view. fetching data json web service , when setting adapter after data fetched web service . when setting text in text view not recognising turkish words , printing garbage text in text view. a little appreciable again

PhpStorm how to increment Recent Find Usages history -

i cannot find option increment history "recent find usages". i see example last 10 searches when clicking ctrl+e in phpstorm. thanks 1.select symbol find usages for. that, place caret within desired symbol in editor, or click symbol in project tool window. 2.do 1 of following: on main menu, choose edit | find | find usages choose find usages on context menu press alt+f7. more details go link go link

github - How to git fetch another branch after cloning a single branch -

i working in system automatically git clones using --branch arg so: git clone --branch master --depth 50 git@github.com:something/cool.git ~/cool and push branch. can't figure out how track remote since git fetch , git pull don't seem able access them. i ended modifying config each branch (or branch glob) want fetch. expressed alias: [alias] # usage: git add-fetch-branch remote branch add-fetch-branch = !sh -c 'git config --add remote.$0.fetch "refs/heads/$1:refs/remotes/$0/$1"'

ios - Swapping images in an IBOutletCollection -

i having trouble correctly swapping 2 uiimageviews stored in iboutletcollection. conceptually, must doing wrong. let's have nsmutablearray of indexed data, , nsmutablearray of indexed uiimageviews, 2 indexed arrays correspond, i.e. nth-indexed element of uiimageview array should reflect nth data element in image array. @property (nonatomic, strong) iboutletcollection(myimageview) nsmutablearray* myimages; @property (nonatomic, strong) nsmutablearray* mydata; at outset, sort iboutletcollection x-coordinate appearance on screen left-to-right, i.e. element of index 0 should appear way left, ..., way right of screen. nscomparisonresult imagesort(id label1, id label2, void* context) { if ([label1 frame].origin.x < [label2 frame].origin.x) return nsorderedascending; else if ([label1 frame].origin.x > [label2 frame].origin.x) return nsordereddescending; else { // determine using y-coordinate if ([label1 frame].origin.y < [label2 fr

oop - $this and instantiating classes in PHP -

i'm having hard time understanding pseudo variable $this . take example following code: <?php class { function foo() { if (isset($this)) { echo '$this defined ('; echo get_class($this); echo ")\n"; } else { echo "\$this not defined.\n"; } } } $a = new a(); $a->foo(); a::foo(); ?> it output: $this defined (a) $this not defined. ok, output makes sense me, since $a->foo refers instance , a::foo refers class without instantiation. take other example, if append following code first example: <?php class b { function bar() { a::foo(); } } $b = new b(); $b->bar(); b::bar(); ?> it output this: $this defined (b) $this not defined. i can understand second output, because b::bar(); refers class, not instance. don't first output. why $this instantiated if method calls a::foo(); , class , should not instantiated, , w

sql - Touch MYSQL record to update TIMESTAMP field -

in database have table column `lastupdated` timestamp not null default current_timestamp on update current_timestamp, i touch record in table lastupdated column automatically updated don't want change value in row. is possible? thank you. afaik, don't have options use touch update mysql table records touch file in unix systems. have issue update query update timestamp in lastupdated column . update mytable set lastupdated=now() ...

c# - Making swipe work for a pivot control with embedded WebBrowser on Windows Phone 8.0 -

i'd application have pivot control webbrowser control in each pivotitem . problem swiping next pivotitem doesn't work since instead results in scrolling web page horizontally. however, web pages responsive , doesn't need scrolled horizontally instead want horizontal swiping result in pivot switch. can accomplished? if can't use pivot control recommended way implement page switching webcontrol s on pages? top menu la ios/android? yes possible, needs little workaround since webbrowser handles event first , pivot doesn't know it. can use purpose touch , event framereported . simple code can this: public mainpage() { initializecomponent(); touch.framereported += touch_framereported; } touchpoint first; private void touch_framereported(object sender, touchframeeventargs e) { touchpoint maintouch = e.getprimarytouchpoint(mywebbrowser); if (maintouch.action == touchaction.down) first = maintouch; else if (maintouch.action == to

linux - How to use multiple-line variable -

how use multiple-line variable in recipe? file-name: multiple-line-variable define foo = echo welcome endef export foo all: echo $(foo) i following output. expect 'welcome' print. $ make -f multiple-line-variable echo suneric's answer didn't correctly explain happening. adding, or not, @ has absolutely 0 reason you're not seeing "welcome" printed. the reason original example did not work expected because you're reading gnu make manual latest version of gnu make (which gnu make 4.0), using online manual, you're using older version of gnu make. not idea, because features discussed in manual not exist in version of gnu make you're using. in case, style of variable definition adds assignment operator after name: define foo = ... is not available before gnu make 3.82. in versions of make before that, syntax defines variable named, literally, foo = . printing $(foo) not show because variable foo not define

eclipse - Common way to download open source projects -

how many different way there download open source projects in order modify , rebuild them (directly in editors eclipse , maven). the short answer "a lot". seriously depends on project. if example project developed individual , not published @ public repository , exists on hard drive not have chance know project exists. if project published in public repository depends on repository. popular way develop open source projects these days github . if project there can clone repository , want. building project depends on author. if he/she uses "standard" build tools (maven, gradle etc) not problem. otherwise depends... if not want modify project want include dependency of project depends on programming language. java libraries typically available in maven repository library author. please not hesitate ask more concrete questions.

getting Error : Couldnt find or load main class while starting WSO2 ESB -

i new wso2 , trying use it. downloaded wso2esb-4.7.0 , given in install.txt . tried running wso2server.bat start but getting error : couldn't find or load main class here command executing on cmd: d:\milton\wso2esb-4.7.0\bin>wso2server.bat start path variables: java_home environment variable set c:\program files\java\jdk1.7.0_25 carbon_home environment variable set d:\wso2as-5.2.1\ thanks in advance ! if java environment working properly, please go ..\wso2esb-4.7.0\bin , run wso2server.bat without parameter. ( have set carbon_home wso2as , not esb ,just remove startup script pick automatically) ..\wso2esb-4.7.0\bin> wso2server.bat also if getting error still, try unpacking esb new location , try again.

mysql - Slow query with where,group by, order by (using filesort) -

hi have trouble optimizing query. have reduced original query (~2 seconds) (0.3s): select kunden.id, kunden.typ, cache.bestellungen_count cache inner join kunden on kunden.id=cache.kunde_id kunden.kundentyp=1 group kunden.id -- order kunden.id desc order cache.bestellungen_gesamtbetrag desc limit 0,500 explain shows filesort used. select_type table type possible_keys key key_len ref rows simple kunden ref primary,kundentyp,id_k... kundentyp 4 const 26235 using where; using temporary; using filesort simple cache ref kunde_id,kunde_id_gesamtbetrag kunde_id 4 partyschnaps.kunden.indexh 1 using index condition i guess problem where, group , order cannot use index, when order kunden.id performance boosts factor of ~30 (0.01s) , can solved index. index on cache table order column , combined 1 fk kunden_id , order column have no effect.

javascript - Detecting if AdBlock extension is installed on the browser -

i need detect if adblock extension installed on user's browser. i have seen similar question on so, of them suggest check if dom has been modified. i rather want check if extension installed (maybe javascript ?) on browser rather check dom. how do ? try global navigator.plugins variable. loop should work. (js) nice blog topic: http://webdevwonders.com/detecting-browser-plugins/ edit: chrome can try if app guid. try { var appguid = "nnbmlagghjjcbdhgmkedmbmedengocbn"; = new image(); a.src = "chrome-extension://"+appguid+"/icon16.gif"; if(a.width != 0) { //app installed! } } catch(e) { //app not installed }