Posts

java - how to open frame2 from another frame1 by clicking button on frame1 in net beans -

i have created 2 frames in project in net beans named library.java , newcustomer.java , have button in library den code go newcustomer clicking button("new customer") in library?? inside library.java create method lets `public void addactionlistnenerstocomponents();` which call in library constructor (just suggestion.. depend on implementation). inside can have action listeners. scenario can like jbutton newcustomerbutton = new jbutton("add customer"); newcustomerbutton.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { newcustomer newcustomerframe = new newcustomer(); newcustomerframe.setvisible(true); } });

How to remove the current date from date box in jquery mobile? -

how remove current date date box .actually when open date box high light current date.but user select date example "14". if user again open date box hightlight "14"and current date. here fiddle http://jsfiddle.net/ravi1989/uhdyv/1/ <input name="mydate" id="mydate" type="date" data-role="datebox" class="documentdate_h" data-options='{"mode": "calbox","usenewstyle":true,"zindex":1200}' /> first click (+) button on header .it show pop .open date box .it show today date select date .then again open date box.it show selected date , today's date.? second issue how change colour of monday , tuesday ...? changing color of current date default theme "a" can use this: <input name="mydate" id="mydate" type="date" data-role="datebox" data-options='{"mode": "calbox"...

css - How to put <li> content in the middle with before: and after: images? -

Image
i'm trying make navigation using <ul> , have 2 images (36px height) right , left borders of button (list item). i add them before: , after: in css, after that, link inside <li> (for example: "main") appears in bottom because of 2 images added (before: , after:). i want text in middle of 2 images normal button. the green want, red get. thanks trying help, somehow managed it. css: #topmenu ul{ list-style: none; padding: 0; } #topmenu ul li{ float: left; margin-right: 5px; background-image: url('images/btnback.png'); background-repeat: repeat-x; height: 36px; border-radius: 8px; } #topmenu ul li:before{ content: url('images/btnleft.png'); float: left; } #topmenu ul li:after{ content: url('images/btnright.png'); } and html: <div id="topmenu"> <ul> <li> <a href="#">main</a> </li> <li> <a href="#">about</a> </li> <li...

What does the jquery statement "var collection = jQuery([1]);" mean? -

on page 109 of book "learning javascript design patterns" , there code sample confused me. jquery.single = (function( o ){ var collection = jquery([1]); // <-- want ask line return function( element) { // give collection element collection[0] = element; // return collection return collection; } })(); the use of function this: $('div').on('click', function() { var html = jquery.single( ).next().html(); console.log( html ); }); update: answering. checked out original code source author page 76 bytes faster jquery var collection = jquery([1]); // fill 1 item, make sure length === 1 now understand. wish author of book "learning javascript design patterns" add comment too, when cited code sample. jquery([1]) passing array 1 entry contains integer 1 jquery, return wrapper array containing jquery prototype methods. it later assigns element argument variable same...

sql server - SQL Query using value from previous row -

i trying subtract value of previous row current row using sql. select rd.ponum, od.orderline, rd.partnum, p.partdescription, od.ordernum, rd.ourqty, od.number01 reserved, case when rd.ourqty - od.number01 > 0 od.number01 else rd.ourqty end allocated, rd.ourqty - od.number01 newourqty, c.custnum, c.name dbo.rcvdtl rd inner join dbo.part p on rd.partnum = p.partnum inner join dbo.orderdtl od on rd.partnum = od.partnum inner join dbo.orderhed oh on od.ordernum = oh.ordernum inner join dbo.customer c on od.custnum = c.custnum (rd.ponum = 73) , (od.number01 > 0) , (od.openline = 1) this returns values: ponum | orderline | partnum | partdescription | ordernum | ourqty | reserved | allocated | newourqty | custnum | name 73 1 10050926 example description 62 55 35 35 20 1032 sam test 73 1 10050926 e...

ios - custom view when local notification is fired -

i relatively new xcode, building simple alarm clock , below small snippet of app. question is: how display custom view ( i.e. picture or animation ) when alarm fired, , put " dismiss " button on ? thank in advance nicola - (void) schedulelocalnotificationwithdate:(nsdate *)firedate :(nsstring *)message { uilocalnotification *notificaiton = [[uilocalnotification alloc] init]; if (notificaiton == nil) return; notificaiton.firedate = firedate; notificaiton.alertbody = message; notificaiton.timezone = [nstimezone defaulttimezone]; notificaiton.alertaction = @"view"; notificaiton.soundname = @"alarm-clock-1.mp3"; notificaiton.applicationiconbadgenumber = 1; notificaiton.repeatinterval = kcfcalendarunitweekday; nslog(@"repeat interval %@",notificaiton.description); [[uiapplication sharedapplication] schedulelocalnotification:notificaiton]; use method handle notifica...

c# - HTML (table) elements with dynamic controls? -

Image
so don't looks this i use multiple placeholders achieve feel though inefficient , take longer loop through each control. cause problems "remove" button because remove associate placeholder in. want display first row of controls separated table cells. you have different ways: 1. use 1 row add or edit record , use gridview or repeater show data 2. use gridview in editmode (but i'm not expert this) 3. can put controls in gridview or repeater , manage events using item/rowcommand