Posts

Showing posts from September, 2011

windows forms designer - C# Null reference exception and StreamReader -

i getting null reference exception when reading data txt file. public class appointments : list<appointment> { appointment appointment; public appointments() { } public bool load(string filename) { string appointmentdata = string.empty; using (streamreader reader = new streamreader(filename)) { while((appointmentdata = reader.readline()) != null) { appointmentdata = reader.readline(); //**this null ref. exception thrown** (line below) if(appointmentdata[0] == 'r') { appointment = new recurringappointment(appointmentdata); } else { appointment = new appointment(appointmentda...

java - ebean run ddl only if the database does not exist -

if have ddl.generate , ddl.run set true , drop database when restart app. if add ddl.createonly=true , throw out exception when create ebean server instance. question: is there anyway me "please create database if not exist, or don't if database created"? please create database if not exist no there not.

winforms - C# How to Move A Circle Along a Rectangle Path -

i need move point along rectangle path @ command of button. want start @ upper right corner of rectangle path, not sure how go way around path , stop @ original point. screen refreshes @ speed provided user in input box. thank in advance! using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.threading.tasks; using system.windows.forms; using system.timers; namespace assignment_2 { public partial class form1 : form { private const int formwidth = 1280; private const int formheight = 720; private const int ball_a_radius = 10; private const int horizontaladjustment = 8; private const double ball_a_distance_moved_per_refresh = 1.6; private double ball_a_real_coord_x = 515; private double ball_a_real_coord_y = 40; private int ball_a_int_coord_x; private int ball_a_int_coord_y; privat...

javascript - Regex matching specific url -

i'm trying test if url wildcard @ end matches one. ^http?://(?:www\\.)?lichess\\.org/?.* is regex, want match http://en.lichess.org/e2kwzt0y , after .org/ should random. sorry inconvenience. try this: /(http:\/\/en\.lichess\.org\/)((?:[a-z][a-z0-9_]*))/i like this: var string = 'http://en.lichess.org/e2kwzt0y'; var match = string.match(/(http:\/\/en\.lichess\.org\/)((?:[a-z][a-z0-9_]*))/i); if(match && match.length){ console.log('match found'); }

jquery - Need help adding caption with arrow over a div on mouseover event -

regarding hover effect, pelase check site http://www.rokivo.com/ i want such effect include headings,buttons , div in mysite. thanks in advance <div class="col-xs-12"> <a href="enquiry.html"><h3 class="orange2 pull-right contact-head">enquiry<br/><i class="fa fa-arrow-right black arrow4 pull-left"></i></h3></a> </div> i used jquery add css transition class on mouseenter , remove class on mouseleave looks odd. want similar effect in referral url above. it sounds didn't want have arrow sliding infinitely removed infinite added longer arrow ( fa-long-arrow-right ) since mentioned "long arrow" in comments. i added forwards arrow stay @ end position of animation , not go beginning. animation-fill-mode .contact-head{ font-size:17px !important; padding:15px !important; border:2px solid #555 !important; border-bottom:5px solid #ffc000 !important; ...

javascript - Drawling normal distribution curve with mean and standard deviation in JS -

i have api when hit gives me mean , standard deviation. want generate mean distribution curve based on above 2 values. how can using javascript(d3.js). want curve generated different values of mean , sigma. mean fitting curve should generated irrespective of mean , sigma api. there equations calculating normal distribution given mean , standard deviation. wikipedia page normal distribution shows density function, want. so you'll want generate function based on mean , variance (standard deviation squared) returned api, generate points using function , chart them using d3.js.

Missing END - Mysql Stored Procedure -

i used writing in tsql , mysql taking adjusting think getting of it. have 1 stored procedure not budge, have read , re-read 100 times, read can find on error , still no luck. on line 11 , end of statement: create temporary table returnavalrooms (roomid int); i error "missing end" though @ beginning of query. have checked , double checked declared , set appropriate ; can't figure out why getting error. below full copy of stored procedure. create procedure `get_availrooms` (in startdate datetime, in enddate datetime, in roomtype int) begin declare pstartdate datetime; declare penddate datetime; declare proomtype int; set pstartdate = startdate; set penddate = enddate; set proomtype = roomtype; create temporary table avaliablenowrooms (select idrooms rooms roomnextavail < pstartdate , roomtypeid = proomtype); create temporary table returnavalrooms (roomid int); declare availrooms cursor select * avaliableno...

javascript - Expected null({ }) to equal Object({ }) -

i have been trying run angularjs own unit tests of $resource. difference i'm running jasmine v2.0 , karma v0.13. did work of converting custom actions older jasmine newer, tests pass. all... i have stumbled 1 type of tests. believe have $httpbackend . whilst testing this line see fails: expected null({ }) equal object({ }). actual test code, problem latest expectation: // --- callback = jasmine.createspy(); // --- it("should create resource", function() { $httpbackend.expect('post', '/creditcard', '{"name":"misko"}').respond({id: 123, name: 'misko'}); var cc = creditcard.save({name: 'misko'}, callback); expect(cc).toequaldata({name: 'misko'}); expect(callback).not.tohavebeencalled(); $httpbackend.flush(); expect(cc).toequaldata({id: 123, name: 'misko'}); expect(callback).tohavebeenc...

Java not receiving udp packets on windows 7 -

i'm making system reading smart-cards. reader devices send out udp packets. wireshark can see packets says have incorrect frame check sequence. on windows 7, while on debian works flawlessly. tried adding rules, specific ports used, firewall... disabled altogether... no joy :/ i wrote bare bones code should verify packets reaching java app : try { datagramsocket s = new datagramsocket(null); inetsocketaddress address = new inetsocketaddress("192.168.1.100",8888); s.bind(address); byte buffer[] = new byte[1024]; datagrampacket packet = new datagrampacket(buffer, buffer.length); while(true) { system.out.println("waiting..."); s.receive(packet); system.out.println("received!"); } } catch (exception e) { e.printstacktrace(); } it seems aren't ... ideas?

powershell - How can I pass a variable using psexec? -

i trying pass variable server name use psexec, have variable $hostname , i'd do psexec \\$hostname when getting error. correct way this? you need give psexec run, e.g. cmd or powershell .

swing - how to return to first cell in the column after editing the last cell in column in java? -

i have created table have 5 columns. cells in column 2 , 3 editable. column 2 has default jtextfield editor , should take number(0,1,2,3,...,9) value only. when application loaded first time, automatically first cell in column 2 become selected , table focus below. public void initfocus(){ swingutilities.invokelater(new runnable() { public void run() { itemstable.changeselection(0,2,false,false); itemstable.requestfocusinwindow(); } }); } what want achieve below: by pressing number(0 until 9) cell edited new value. by pressing enter next cell in column ready edited. if user riches last cell in column , edit , press enter, first cell in column ready editing again. i have tried in table result not ok: body know how catch these goals? example of simple table appreciated. in advance itemstablemodel = new defaulttablemodel(){ @override public boolean iscelleditable(int row, int column) { ...

google chrome - Cursor in wrong place in contenteditable -

i have contenteditable div non-editable "islands". working until non-editable part last thing in editable div. in case cursor not right behind non-editable @ end of editable div. see example borrowed question here fiddle can try on: http://jsfiddle.net/rysvz/2/ . when delete dot @ end, cursor jump away. behaviour safari , chrome. guess webkit issue. here code sample: <div contenteditable="true" class="editor"> sample template <span class="mergecode" contenteditable="false">mergecode1</span>. </div> do have idea why happening , how fix it? i have fixed problem, maybe acceptable too. &zwnj;<button contenteditable=false>press</button>&zwnj; the problem caused caret having no space go if wrap contenteditable divs in 0 width non joining spaces gives caret somewhere go. jsfiddle

ios - JASidePanelController iOS7 showing contents below status bar? -

anyone know fix this? there discussion going on here well: https://github.com/gotosleep/jasidepanels/pull/164 i know post old users still have same problem check answer here : https://stackoverflow.com/a/21426077/1572408 hope helps :)

ruby on rails - How to use an array to use Paperclip's photo.url method? -

the app : application has many buses. each bus has many photos of interior , exterior. some of interior photos have associated image indicates location on bus photos taken (like "you here" marker on map), assigned through :parent_id attribute corresponds "parent" photos id. the goal: output url "child" image if selected photo "parent," , keep blank if not. the problem: way know how find particular associated image brings array. unfortunately me, photo.url method comes paperclip can't work array. this closest want, but, again, brings array can't use find image url. def assigned_floorplan(where pass in parent images params) bus_images.all(conditions: { is_floorplan: true, parent_id: params.id }) end is dead end, or there way pull out id of associated image array can use photo.url method? or going wrong way? i'm willing approach problem totally differently if have suggestions. you have call photo.url meth...

string - How to write Java code to take any date user inputs, and list the next 40 days? -

i trying ensure nextday method can add 1 day date user entered , ensure adds 40 days correctly, taking account correct days per month , leap years public nextday() { (int count = 1; count < 40; count++) ; } public string todaydatestring() // todaydatestring method { int countdays = 0; (int = 1; < getmonth(); i++) { if (i == 2 && checkleapyr(getyear())) countdays += 29; else countdays += dayspermonth[i]; } countdays += date; string message = string.format("\n", countdays, getyear()); return message; } private boolean checkleapyr(int inyear) { // check leap year method. if (getyear() % 400 == 0 || (getyear() % 4 == 0 && getyear() % 100 != 0)) return true; else return false; } below menu supposed allow user choose enter date or quit, date not being accepted correctly. { public static void main ( string [] args) // user selects how enter dates {...

android - Appcompat missing in sdk folder -

i trying use android v7 appcompat library ( http://developer.android.com/tools/support-library/setup.html# ) shows the problem folder "appcomapt" has in here(/extras/android/support/v7/appcompat/) missing i've checked sdk manager "android support repository" , "android support library" installed could please teach me "appcompat" is? thank you i had same problem on os x. updated android sdk manager latest version, deleted , re-installed support library, , worked.

ios - monitoringDidFailForRegion calls only on ipad -

i have developed ios application supports both iphone & ipad. in application have integrated location tracking feature. here how implemented it. //start monitoring region checked in location cllocationcoordinate2d centercoordinate = cllocationcoordinate2dmake(latitude,longtitude); regionalmonitor = [[clregion alloc] initcircularregionwithcenter:centercoordinate radius:regional_monitor_radious identifier:@"checkedin"]; [locationmanager startmonitoringforregion:regionalmonitor]; - (void)locationmanager:(cllocationmanager *)manager didenterregion:(clregion *)region { nslog(@"didenterregion"); } - (void)locationmanager:(cllocationmanager *)manager didexitregion:(clregion *)region { nslog(@"didexitregion"); } - (void)locationmanager:(cllocationmanager *)manager monitoringdidfailforregion:(clregion *)region witherror:(nserror *)error { nslog(@"region monitoring failed error: %@", [error locali...

youtube - Can you have multiple channels returned from one refresh/access token? -

i'm trying find definitive answer whether multiple youtube channels can tied 1 refresh/access token, , if so, if can returned youtube v3 api multiple item enteries, or if 1 can returned regardless of whether multiple channels linked refresh/access token possible? tokens attached 1 channel only. if user has multiple channels tied same account, pick 1 authorized against during oauth2. more information here .

c++ - Clear the memory after returning a vector in a function -

i have function processes , stores lot of data in , returns results vector of class. amount of data stored in function tremendous , want clear storage memory of function after finished job. necessary (does function automatically clear memory) or should clear memory function? update: vector<customers> process(char* const *filename, vector<int> id) { vector<customers> list_of_customers; (perform actions) return list_of_customers; } variables defined locally within function automatically released @ end of function scope. destructors objects called, should free memory allocated objects (if objects coded correctly). example of such object std::vector . anything you've allocated new must have corresponding delete release storage. try avoid doing own allocation , use raii instead, i.e. containers or smart pointers.

c# - Check number of times if file is ready -

i printing printdocument pdf.i store pdf in ms sql table.i have make sure document "printed" before insert column.i have following code check if file "available": public static bool isfileready(string sfilename) { try { using (filestream inputstream = file.open(sfilename, filemode.open, fileaccess.read, fileshare.none)) { if (inputstream.length > 0) { return true; } else { return false; } } } catch (exception) { return false; } } i want add sort of upper limit either time takes or number of times checks if file ready. if printer fails thread keep waiting forever. how implement it? this code exits loop if max retries reached or max time has elapsed: private const int max_retries = 100; private const int max_retry_seconds = 120; public static bool isfi...

javascript - Jquery menu not hiding on mouse leave -

i have following menu (which icon needs display drop down menu. can menu show , hide toggle, when that, try move displayed links closes, if trigger on hover with add class, cant menu go away. have way smoothly show , hide menu on mouse on , click? <div id="global_menu"> <span id="show_global_menu" class="icons_large">(</span> <ul id="dropdown" class="hidden"> <span class="arrow-u" style="margin-top:-8px;"></span> <li> @ajax.actionlink("icon legend", "font_legend", null, new ajaxoptions { updatetargetid = "placeholder_extra1", insertionmode = insertionmode.replace, httpmethod = "get" }, new { @class = "" })</li> <li><a href="../home/index" title="sign out">sign out</a></li> ...

python - UnicodeDecodeError in textblob tutorial -

i'm trying run through textblob tutorial in windows (using git bash shell) python 3.3. i've installed textblob , nltk dependencies. the python code is: from text.blob import textblob wiki = textblob("python high-level, general-purpose programming language.") tags = wiki.tags i'm getting following error traceback (most recent call last): file "textblob.py", line 4, in <module> tags = wiki.tags file "c:\python33\lib\site-packages\text\decorators.py", line 18, in __get__ value = obj.__dict__[self.func.__name__] = self.func(obj) file "c:\python33\lib\site-packages\text\blob.py", line 357, in pos_tags word, t in self.pos_tagger.tag(self.raw) file "c:\python33\lib\site-packages\text\taggers.py", line 40, in tag return pattern_tag(sentence, tokenize) file "c:\python33\lib\site-packages\text\en.py", line 115, in tag sentence in parse(s, tokenize, true, false, false, false, encoding).spli...

Determining cause of CPU spike in azure -

i relatively new azure. have website has been running couple of months not traffic...when users on system, various dashboard monitors go , flat line rest of time. week, cpu time when way when there no requests , data going in or out of site. there way determine cause of cpu activity when site not active? doesn't make sense me should have cpu activity being assigned site when there site activity. you need collect data understand what's going on. first thing is: 1. go azure management portal -> website (assuming using azure websites) -> dashboard -> operation logs. try see whether there suspicious activity going on. download logs site using ftp client , analyze what's happening. if there not data, suggest adding more logging in application see happening or module spinning.

entity framework computed stored procedure -

is there way in entity framework 6 code first use stored procedure updates column, provided user? i've tried that, unfortunatelly without success. my sp looks following one: alter procedure [dbo].[hotel_insert] @bezeichnung [nvarchar](max), @sterne [int], @regioncode [int], @version [int] begin insert [dbo].[hotels]([bezeichnung], [sterne], [regioncode], [version]) values (@bezeichnung + '!', @sterne, @regioncode, @version) select [bezeichnung] bezeichnung , [hotelid] [dbo].[hotels] t0 @@rowcount > 0 , t0.[hotelid] = scope_identity() end i've tried define property computed result (see below). is there wrong or ef not support such scenario? wishes, manfred modelbuilder.entity<hotel>().maptostoredprocedures(s => s.insert(proc => proc .hasname("hotel_insert") .parameter(h => h.bezeichnung, "bezeichnung") ...

What's the best way to implement a semaphore in Go -

i have test program want run multiple copies of program command-line, , need know first instance of program start. in dart, following suggested me : rawserversocket.bind("127.0.0.1", 8087) if fails, know program has "locked" port. solves problem sufficiently me. lock released when program terminates or when socket explicitly closed. how can achieve similar result in go? you don't platform using. if want cross platform solution of opening local socket easy. here how in go. package main import ( "log" "net" "time" ) func main() { ln, err := net.listen("tcp", "127.0.0.1:9876") if err != nil { log.fatal("failed lock: ", err) } defer ln.close() log.print("started") time.sleep(time.second * 10) log.print("ending") } a cross platform way of doing without using socket quite hard unfortunately , involve 2 sets of code ...

c# - conditional component registration in autofac -

is possible register component conditionally on other component's state? like: containerbuilder.registerconditionally<t>( func<icomponentcontext, bool>, func<icomponentcontext, t>); i've found prior v2 of autofac 1 use " register().onlyif() " construction seemed 1 i'm looking for. such feature conditionally override default registration. class commonregistrations { public virtual void register(containderbuilder builder) { builder.register(ctx => loadsettings()).as<isettings>().singleinstance(); builder.registertype<defaultfoo>().as<ifoo>(); } } class specificregistrations : commonregistrations { public virtual void register(containerbuilder builder) { base.register(builder); builder.conditionalyregister( ctx => ctx.resolve<isettings>().reallyusespecificfoo, ctx => new specificfoo()).as<ifoo>(); } } ... var builder = new containerbuilder(); var regi...

html - JavaScript runtime error: '$' is undefined when trying to run sample code -

i trying run sample chart code http://www.highcharts.com/demo/line-time-series breaking. getting following error unhandled exception @ line 12, column 7 0x800a1391 - javascript runtime error: '$' undefined the code: $(function () { $('#container').highcharts({ chart: { zoomtype: 'x', spacingright: 20 }, title: { text: 'usd eur exchange rate 2006 through 2008' }, subtitle: { text: document.ontouchstart === undefined ? 'click , drag in plot area zoom in' : 'pinch chart zoom in' }, xaxis: { type: 'datetime', maxzoom: 14 * 24 * 3600000, // fourteen days title: { text: null } }, yaxis: { title: { text: 'exchange rate' ...

Unable to pass authentication information to NetSuite's REST interface using Python -

i've been trying netsuite restlet work python 3.3 using urllib , can't seem authorization take , continually return urllib.error.httperror: http error 401: authorization required error. where going wrong authentication? my test code follows: import urllib.request url = 'https://rest.netsuite.com/app/site/hosting/restlet.nl?script=123&deploy=15&recordtype=salesorder&id=123456789' authorization = 'nlauth nlauth_account=111111,nlauth_email=email@email.com,nlauth_signature=password,nlauth_role=3' req = urllib.request.request(url) req.add_header('authorization', authorization) req.add_header('content-type','application/json') req.add_header('accept','*/*') response = urllib.request.urlopen(req) the_page = response.read() for reference, netsuite's rest used build authorization string python docs on urllib located here --edit-- the header passed (and works) via rest console appears follows: ...

oracle - PL/SQL - How to use an array in an IN Clause -

i'm trying use array of input values procedure in in clause part of clause of cursor. know has been asked before, haven't seen how make syntax compile correctly. in package specification, type type t_brth_dt table of sourcetable.stdt_brth_dt%type index pls_integer; sourcetable.std_brth_dt date column in table. simplified version of cursor in package body - cursor datacursor_sort( p_brth_dt in t_brth_dt) select * sourcetable a.brth_dt in (select column_value table(p_brth_dt)) when try compile this, i'm getting following errors. [1]:(error): pls-00382: expression of wrong type [2]:(error): pl/sql: ora-22905: cannot access rows non-nested table item i know looks similar other questions, don't understand syntax error is. in order use collection defined nested table or associative array in from clause of query either should, @alex poole correctly pointed out, create schema level (sql)...

visual studio 2010 - C++ Declaration is incompatible with method -

i have issue class implementing. typedef enum { yellow, green, blue } colour; class stream { public: stream(); ~stream(); double getrate(colour colour); private: double yrate; double grate; double brate; }; stream::stream() { yrate = 2.2; grate = 3.3; brate = 4.4; } stream::~stream() { } double stream::getrate(colour colour) { double rate; switch(colour) { case yellow: rate = yrate; break; case green: rate = grate; break; case blue: rate = brate; break; } return rate; } i using visual c++ 2010 express, , cannot compile because error is: 'error: declaration incompatible "double stream::getrate(colour colour)" is there missing, or order have confused? thanks in advance. write enum colour { yellow, green, blue }; instead. typedef idiom you're using (in incomplete way) c compatibility which, tags, don...

android - Cancel ALL Animation on SingleInstance -

i wondering if @ possible cancel animation when starting singleinstance activity, using @override public void onstop() { super.onstop(); overridependingtransition(0, 0); } @override public void onresume() { super.onresume(); overridependingtransition(0, 0); } for when finish called , intent.addflags(intent.flag_activity_no_animation); to activate it... theres still black screen ( short loading one). trying creating costume theme , didnt cancel it. i kinda gave hope... know fragments solve it. there way without? have tried calling overridependingtransition after calling startactivity(...) you can disable animations via themes developer should create style, <style name="noanimtheme" parent="android:theme"> <item name="android:windowanimationstyle">@null</item> </style> then in manifest set theme activity or whole application. <activity android:name=".ui.articlesactivit...

c++ - C project O file still looking for Cpp file after removal during make -

i working on c project , objective remove unwanted references project. changed code , not need references anymore.so decided remove files project folder see if still works alright. now, remove , try build again see following error: * no rule make target gnu_getopt.c', needed by gnu_getopt.o'. stop funny thing have removed both o file , c file manually , search them in folder, not able find them. not sure why(and where) still seeing o file looking c file? there 1 thing noticed there folder called .dept , has bunch of po files. though delete files manually gnu_getopt.po file shows there after failed build. on side note, working in cygwin environment not sure how helpful be? you need remove file makefile check srcs = or grep file gnu_getopt , remove it.

VB.NET open and print an excel file -

i developing simple vb.net desktop app little printing business. has main winform, buttons opening jpg/pdf/word/excel files, open associated program, print file, capture spool job, , charge user being printed, based on printer name, number of pages, size of pages , cost per page. no big deal. hosts machines have win7 os. when user wants print xls file, want app open excel 2010, opening file selected file dialog. , when excel opens, go directly print dialog, when job finishes load in spool, capture event , kill excel process. my problem is: i cant open excel directly going print dialog. excel respond "print" verb. prints default printer. want open , go print dialog. not want print default printer, need allow user select desired printer, pages, copies, etc. i'm trying following code: dim openfiledialog1 new openfiledialog() dim filepath string = "" dim startinfo processstartinfo 'openfiledialog1.initialdirectory = "c:\" ...

php - Update a field by $model->updateAll in Yii -

i want execute query : update table_name field=field+1 what i'm trying : $model->updateall(array("field"=>"field+1"),"id = ".$id); field integer , , after running code updates 0 . does syntax wrong $model->updateall ? do have use function ? $model->updateall can't , correct function should use is: $model->updatecounters(array("field"=>"1"),"id = ".$id);

javascript - wikitude: POI is not render accordingly -

i'm able launch wikitude poi sample using android phone. have tried create own wcf retrieve geolocation data. whenever retrieve own geolocation data, marker not display on screen. but, if use geolocation data sample itself, markers show on screen. i'm sure that, $.ajax able own geolocation data. not able display it. how verify that? display geolocation data have retrieved on phone screen. next, did is display current geolocation on phone screen (latitude: 3.1229609, longitude: 101.6345425) use browser confirm again geolocation instead of render markers data retrieved wikitude, hardcoded 1 geolocation data available sample data. (marker 1, "longitude":"0.045","latitude":"0.056") i hardcode geolocation nearest me. (marker 2, latitude: 3.116562, longitude: 101.646538) only marker1 being rendered on screen. regardless how or move phone camera to, still couldn't find marker2. i'm wondering, wikitude poi location same g...

javascript - How can I return only filtered model in Emberjs? -

i have ember.select filters model based on roles. @ moment, when app initiates full contents of model shown want show model when filters applied. clueless on how gonna that. here's controller in question, app.twodcontroller = ember.arraycontroller.extend({ //filteredcontent : null, sortproperties: ['firstname'], sortascending: true, selectedexperience : null, experience : [{ exp : "1" }, { exp : "2" }, { exp : "3" }, { exp : "4" }, { exp : "5" }], selecteddesignation : null, filterdesignation : function() { var designation = this.get('selecteddesignation.designation'); var filtered = this.get('content').filterproperty('designation', designation); this.set("filteredcontent", filtered); }.observes('selecteddesignation'), designations : [{ designation :...

google authentication - Application Specific Password issues -

i'd implement 2-factor authentication google account need connect google services in various scripts. does each script require own asp? how google define "application" is? if 2 people run same script different machines each need unique asp? you should never embed passwords in code. instead, should use oauth token grants permission perform appropriate actions. preferred way use services code, , should supported google apis. the answer question whatever want. point of having multiple app-specific passwords allow revoke 1 of them without affecting others (in case 1 device gets stolen). can use each password many times want.

javascript - Using Kendo Grid with Server Side Filters and Server Side Sorting, Field = NULL? -

i'm using kendo grid, server side filtering , server side sorting. in data source transport read method field null. suggestions? this code initializing grid: var griddatasource = new kendo.data.datasource({ transport: { read: { url: '@url.action("read", "gridmodule")', type: 'post', contenttype: 'application/json' }, parametermap: function (options) { options.assignmentfilters = assignmentfilters; return json.stringify(options); } }, pagesize: 20, serverpaging: true, serversorting: true, serverfiltering: true, schema: { model: { fields: { lastsurveydate: { type: "date" }, lastnotedate: { type: ...

javascript - Split datepicker dates into separate inputs -

i'm attempting split datepicker dates 3 inputs booking engine. want pass dates cid (check-in day) cim (check-in month) , ciy (check-in year). seem have split process down, correct dates not getting passed booking engine. please help! see below. code going php/text widget wordpress. jquery(document).ready(function() { jquery('#datepicker1').datepicker({ dateformat : "mm-dd-yy", onclose: function(datetext) { var dateparts = datetext.split("-"); $('#cim').val(dateparts[0]); $('#cid').val(dateparts[1]); $('#ciy').val(dateparts[2]); }, }); }); jquery(document).ready(function() { jquery('#datepicker2').datepicker({ dateformat : "mm-dd-yy", onclose: function(datetext) { var dateparts = datetext.split("-"); $('#com').val(dateparts[0]); $('#cod').val(dateparts[1]); $('#coy...

javascript - Angular $http.get -

i'm trying show lists , tasks associated each list. in controller have: $http.get('api/list/').success(function (data) { $scope.lists = data; $scope.tasks = data[0].task; }); this works first item of course data[0].task needs dynamic. problem i'm having being called once each list. tried using variable gets reset it's original value. i've tried using callback no luck. i'm not sure i'm overlooking or if i'm going wrong. your get api/list/ request return this: [ { "id": 1, "name": "list #1", "tasks": [ { "id": 1, "name": "task #1 on list #1" }, { "id": 2, "name": "task #2 on list #1" }, { "id": 3, "name...

operating system - MVS OS-390 - How do I Capture Job Information from CA-JOBTRAC programmatically -

i using rexx invoke jobtrac programmatically works unable pass jobname arguments using approach. can done using rexx? the idea find history of job run using program jobtrac. use jobtrac's schedule find history of when job runs happened. invoke jobtrac using ‘tso jobtrac’ , supply history command ‘h xxxxxx’ in command line (xxxxx – jobname) i thinking route jobtrac info flat file , parse can reporting real time during job run. above problem linked following scenario: if give dslist 'dslist a.b.c.*'’ in ispf panel it gives series of datasets ... a.b.c.a, a.b.c.d a.b.c.e when give "save orange" it stores list under myuserid.orange.datasets. i know can automated pro grammatically , have seen . don’t have code base right now. similar jobtrack issue have. here rexx code understanding. know code wrong…we cannot use outtrap used console output. say 'no. of month end jobs considered history :'jobnames.0 if jobnames.0 > ...

jquery - Get contents of a clicked div -

i have string of divs same css class (.nav_div), different text in each, in navigation bar. they're set this: <div class=nav_div>contact</div>... i set divs enter function when clicked, this: $('.nav_div').click(nav_is_clicked); in function nav_is_clicked() , want store contents of div clicked in variable called div_text , i'm having trouble. did not work: var div_text = $(this).contents().text(); how text div clicked? thanks. just use text() . contents() gives " the children of each element in set of matched elements, including text , comment nodes. ", not want. $('.nav_div').click(nav_is_clicked); function nav_is_clicked() { var div_text = $(this).text(); } edit - it looks original code work: http://jsfiddle.net/slves/ are binding click handler before element exists (like before page loaded)?