Posts

sql - oracle: can you assign an alias to the from clause? -

can assign alias clause? like: select - b "markup" retail a, cost b; edit: sorry typed out bit quick , tried simplify question point didnt make sense what im trying use aliases compare months between 2 publishing dates in same table. here's found works: select distinct to_char(months_between((select distinct pubdate books3 pubid = 2), (select distinct pubdate books3 pubid = 4)), '99.99') "answer" books3 i wanted looks this: select distinct months_between(a,b) (select distinct pubdate books3 pubid = 2 a), (select distinct pubdate books3 pubid = 4 b) but isn't working yes, oracle supports table aliases. supports as in select list not in from list: select a...

How can I get data from JavaScript code in a .NET WebBrowser control running on mono? -

the webbrowser control designed able make calls javascript .net (and pass data) via objectforscripting property (on .net side) , window.external object on javascript side. however, not implemented in mono. what options getting data and/or making calls javascript side .net side? (mono support communication in other direction via document.invokescript method.) ahh, found way: mono , window.external upodate: crap. in mono, setting location.url causes browser control's document property clear, makes impossible later call script using document.invokescript.

arraylist - check to see if 3 values in array are consecutive? -

i have array, example contains values 123456, contains more 3 consecutive values. i want method return true if array contains @ least 3 consecutive values in it, in advance. for example: 972834 - return true (234) 192645 - return true (456) etc. etc.. update! : i have array in java, takes in 6 integers. example nextturn[], , contains 8 4 2 5 6 5 @ moment sorts array - 2 4 5 5 6 8 how return true if there 3 consecutive numbers throughout array? ie find 4 5 6 i return position of integer in array, original array 8 4 2 5 6 5 it return, 2 4 5 or 2 5 6 thanks guys, appreciated the straight forward solution loop through items, , check against next 2 items: bool hasconsecutive(int[] a){ for(int = 0; < a.length - 2; i++) { if (a[i + 1] == a[i] + 1 && a[i + 2] == a[i] + 2) return true; } return false; } another solution loop through items , count consecutive items: bool hasconsecutive(int[] a){ int cnt = 1; (int = 1; < a.len...

php - What is the best solution for 2 sites integrated to each other -

i have 2 sites integrated one, wordpress second site under subdirectory of first site "mysite/community" have integrated registration , login. being hesitant combining tables 1 database since uses both of native sessions. install database of wordpress separate 1 or can combine them? i'm confused of combining them since first site ecommerce site. what point of integrating them? do want users impression on using 1 site? if having 1 login , 1 , feel important things. do want ease administration? merging databases might helpful. when talking 2 databases, won't worry it. update: speed: depends on lot if things if 2 or single database faster. way tell try it. , remember tuning worth effort when performance become problem. reliability single database db problem 1 site becomes automatically problem both sites. security: similar reliability: vulnerability in 1 site might punch through other site, bad if 1 ecommerce site. maintainability: if have 1 db...

iis - How can I open an .EXE file from an ASP.NET site? -

can open executable files on client machine asp.net site hosted on iis? i have tried using following code in asp.net: process notepad = new process(); notepad.startinfo.filename = "notepad.exe"; notepad.startinfo.arguments = @"e:\abc.txt"; notepad.startinfo.createnowindow = false; notepad.startinfo.useshellexecute = false; notepad.startinfo.redirectstandardoutput = false; notepad.start(); and in javascript following code: function launch() { var w = new activexobject("wscript.shell"); w.run('notepad.exe'); return true; } but both snippets open file when site not hosted in iis. any appreciated. thank in advance. you not able launch executable on client (the computer running browser) under pretty circumstance... your code in c# lives on server looks trying run notepad if working opening notepad instances on server...not client. if did manage allow client give permissions run notepad (a big if), you'd w...

Struts and ValidatorForm --> does it work with variable number of form elements? -

hi, i have form generate rows of input elements (using javascript) users enter data. each row contains data particular box user entering (e.g. height, width, length, etc.). i've gotten form work , can read actionform into/out of arraylist object. i'd validate these entries catch invalid entries front. (i'm on 1.3.10) can't seem find documentation using validatorform dynamic number of form elements. is, never know how many rows of boxes entered, , wonder if has used validator validate dynamic form elements? is possible? or resigned implement .validate() method? is possible use validator elements , leave rest .validate() method? has done this, , if so, pitfalls? i'd appreciate comments or pointer resource can read up. you can making following steps. 1. define class (simple pojo) dimensionbean; contains value of 1 row input elements (like height, width, length etc). 2. in form bean (child of validatorform), define array or list of dimensio...

c - Can we invoke functions of a DLL compiled for 64 bit using an application compiled for 32 bit? -

can invoke functions of dll compiled 64 bit using application compiled 32 bit? i using windows 2008 64 bit system. but, application still compiled using 32 bit. the code involves mfc & windows sdk functions. no. 32-bit application cannot load 64-bit module process space (nor vice versa). remember 32-bit processes supported on 64-bit versions of windows in dedicated windows-on-windows (wow64) subsystem. makes interoperability tricky @ best. raymond chen's blog entry on subject quite instructive, if care technical details. you either need recompile 1 or other, or load separate process , use interprocess communication coordinate between two.