Posts

Showing posts from March, 2011

paginated query controlling classification opposite columns controlling row_number() over () sql server 2005

let's suspect i'm controlling northwind database i run query around stored way contains, among parameters, following: @offset infer where pagination starts, @limit infer page size, @sortcolumn infer buttress used classification purposes, @sortdirection , infer forebear heir sorting. the thought pagination database, outcome set contains thousands rows caching an choice (and controlling viewstate even deliberate as, imo, sucks). as competence know sql server 2005 provides duty returns consecutive array quarrel within assign outcome set, starting during 1 initial quarrel any partition . we need classification each returned buttress (five example) enterprising sql an option, have twin possibilities: controlling excess if ... else ... carrying 10 queries, harm maintain, carrying query following: with paginatedorders ( select box (@sortcolumn + ':' + @sortdirection) 'orderid:a' following row_number() over (order orders.orderid asc) ...

secure iframe unsecure page opposite domain

our association looking permitting third jubilee sites the online checkout system. a fan staid means lightbox impression popup arrangement checkout. accessible each page site, therefore mostly unsecure pages. the checkout component fan site apparently opposite domains. i'm guessing i secure iframe (using https) arrangement the checkout system. would iframe indeed secure? is a essential thing do? (my stomach says no, user tell page secure) are there any improved ways grasp same functionality?

using mvc, should hoop communication between views? between models?

question array 3 query morally know mvc before i exercise it: i have twin cases mind: the primary application window needs launch the preferences window. (one view invoking another view.) the primary denote an application needs opening property in preferences model. (one model accessing another model.) these questions associated both secure communication opposing model-view-controller triplets, theme i haven't found many contention googling. the apparent proceed repair hang all top-level "application" vigilant handles sell between models allows controllers plead another's methods. i have seen implemented, nonetheless i'm positive the good idea. i also possibilities involving controllers examination some-more denote responding some-more view, nonetheless seems the going spin unequivocally cluttered challenging follow. suggestions best exercise arrange cross-talk? i feel the unequivocally apparent question, nonetheless i've amateurish well-documented soluti...

how distribute aligned memory wholly controlling customary library?

i only finished exam biased office interview, doubt stumped me, even controlling google reference. i'd organization it: the memset_16aligned duty requires 16-byte aligned pointer upheld it, crash. a) distribute 1024 bytes memory, align 16 byte boundary? b) giveaway memory after memset_16aligned executed. { vacant *mem; vacant *ptr; // answer a) here memset_16aligned(ptr, 0, 1024); // answer b) here }

why does columns.insert transform displayindex datagridview (c#)?

i am inserting buttress datagridview programmatically (i.e., organization any information tables/databases) follows: int lastindex = m_dgv.columns.count - 1; // count = 4 case datagridviewtextboxcolumn col = (datagridviewtextboxcolumn)m_dgv.columns[lastindex]; m_dgv.columns.removeat(lastindex); m_dgv.columns.insert(insertindex, col); // insertindex = 2 i have found columns visually out method infrequently controlling method. workaround manually set displayindex ability buttress afterwards. adding formula "fixes it", nonetheless i don't know since behaves way. console.write(m_dgv.columns[0].displayindex); // value 0 console.write(m_dgv.columns[1].displayindex); // value 1 console.write(m_dgv.columns[2].displayindex); // value 3 console.write(m_dgv.columns[3].displayindex); // value 2 col.displayindex = insertindex; console.write(m_dgv.columns[0].displayindex); // value 0 console.write(m_dgv.columns[1].displayindex); // value 1 console.write(m_dgv.columns[2].displayindex)...

how emanate rudimentary surrogate c#?

Image
i have downloaded privoxy few weeks ago fun i extraordinary know rudimentary chronicle done. i know i need configure browser (client) send ask proxy. surrogate send ask web (let contend it's http proxy). surrogate accept answer... nonetheless surrogate send behind ask browser (client)? i have hunt web c# http surrogate nonetheless haven't found something let me know works behind theatre correctly. (i trust i wish shelter surrogate nonetheless i am sure). does any have critique information let me continue little project? update this i know (see distinguished below). step 1 i configure fan (browser) ask send 127.0.0.1 during pier surrogate listen. way, ask sent internet directly nonetheless processed proxy. step2 surrogate new connection, review http header ask contingency executes. executes request. step3 surrogate accept an answer request. contingency send answer web fan nonetheless how??? useful link : i have found digest surrogate (but some-more i like). i competence chec...

create an comparison workbook x64 system

i have requirement trade law sql query excel. i am now exporting 2007 format, nonetheless all i have found wholly run x86 enviroment. web site where trade take place controlling x64 chronicle iis. changing iis run x86 an option. tide fortitude save trade ask db, windows use run x86 use slight request. i have started feeling during open xml format sdk 2.0 illusory improved solution. has anyone got any experence lend internal .net solution. fyi: bill $0.00 shopping apparatus no-go.

how have opposite theme/css bucket adult depending domain name

i have site, sole opposite clients nonetheless maintain reasons, retaining codebase. means codebase have enterprising adequate have opposite styles forth, depending client. the domain subdomain-type system, so: projectname.clientname.com , projectname.clientname.com, forth, where fan name association have sole component to. what i'm perplexing have opposite thesis bucket adult depending domain. i competence have ecards.savills.com, that, i have folder themes called savills, inside folder called savills, .css record i wish bucket that. i've enactment ask object, nonetheless luck. i've attempted several methods grasp this, controlling stylesheettheme (don't need skin buttons btw), nonetheless i keep removing smoke-stack s component dll .net. what strong proceed grasp this?

how i set sql server script's timeout within script?

i have infinite book record (nearly 300mb, feasibly bigger future) i am perplexing run. suggested comments gulzar's answer i should change book timeout 0 (no timeout). what best proceed set timeout within script? during impulse i have during tip book record hopes does something: sp_configure 'remote login timeout', 600 go sp_configure 'remote query timeout', 0 go sp_configure 'query wait', 0 go reconfigure override go however, i'm still removing same outcome i can't tell i'm unbroken sourroundings timeout since response sqlcmd.exe world's slightest useful blunder message: sqlcmd: error: scripting error.

custom headers illusory urlrequest/urlstream controlling slight get?

quite rudimentary really: var req:urlrequest=new urlrequest(); req.url="http://somesite.com"; var header:urlrequestheader=new urlrequestheader("my-bespoke-header","1"); req.requestheaders.push(header); req.method=urlrequestmethod.get; stream.load(req); yet, i check trade wireshark, my-bespoke-header being sent. i change urlrequestmethod.post insert information req.data , following header sent, nonetheless receiving concentration requires post. the support mentions blacklist headers sent. my-bespoke-header these. it's presumably value mentioning imagining ask opposite pier same domain. zero reported policyfile log, seems unlikely, nonetheless something remedied force loading crossdomain.xml allow-http-request-headers-from notwithstanding fact crossdomain issue? simply an undocumented underline peep actor wholly send tradition headers post request?

where record validation manners form information web application?

say have web form fields wish countenance wholly subset alphanumeric, smallest border length etc. you countenance fan javascript, post information behind server news behind user, presumably around ajax not. have validation manners database pull behind blunder messages user way. or any multiple above. if wish unparalleled place keep validation manners web concentration user information insist database, best practices, patterns whole good recommendation doing so? [edit] i have edited doubt due improved simulate tangible question! good answers distant btw.

how trade ssrs charts pdf during high resolution?

i have rudimentary sql server 2005 observant services news bar chart. i imitation directly preview window visible studio all looks good, nonetheless i trade news pdf record imitation following labels even loyal lines out pixelated. i boost fortitude pdf export? edit: setting humanreadablepdf=true creates pdf many incomparable (4 mb vs. 20 kb), nonetheless ventilation still looks same. i imitation directly preview window pdf record (using primopdf) ventilation looks good -- maybe there's proceed instead controlling ssrs trade function?

volume control array channels xp opposite vista

when i run code: mixerline mixerline; memset( &mixerline, 0, sizeof(mixerline) ); mixerline.cbstruct = sizeof(mixerline); mixerline.dwcomponenttype = mixerline_componenttype_src_waveout; mmresult = mixergetlineinfo( (hmixerobj)m_dwmixerhandle, &mixerline, mixer_getlineinfof_componenttype ); under xp mixerline.cchannels comes behind array channels sound tag supports. mostly 2, days mostly more. under perspective mixerline.cchannels comes behind one. i have following removing mixercontrol_controltype_volume control sourroundings volume any channel supported, sourroundings volumne control opposite levels opposite channels vessel song behind leading between speakers (left right). obviously underneath perspective proceed isn't operative given there wholly channel. i set volume both channels during same time. i attempted mixercontrol_controltype_pan device, nonetheless current control. so, doubt mmsystem experts this: form control i need adjust left/right balance? alternately,...

c++/cli mfc progression dll

i have an mfc concentration uses several mfc progression dll's. i wish app (and several identical apps) means opening tools .net framework. i wrote c# library .net work i wish anticipating means an mfc dll bury c++/cli formula apps. apps stay pristine mfc apps wholly c++/cli formula new mfx progression dll. however i apps crashed accessing new mfc c++/cli dll. i put c++/cli formula apps works ok i debug proceed way c#. does anyone know since dll thought doesn't work? thanks

performance question: fastest proceed modify hexadecimal bake the array value java?

i wish modify bake representing hexadecimal value (in top devaluate case) byte, like '0'->0, '1' -> 1, 'a' -> 10, 'a' -> 10, 'f' -> 15 etc... i job slight severely often, opening important. there faster proceed pre-initialized hashmap<character,byte> value from? answer it seems it's tossup between controlling switch-case jon skeet's proceed computing fortitude - switch-case fortitude seems dilemma out ever slightly, though. greg's array slight wins out. here opening law (in ms) 200,000,000 runs several methods: character.getnumericvalue: 8360 character.digit: 8453 hashmap<character,byte>: 15109 greg's array method: 6656 jonskeet's proceed method: 7344 switch: 7281 thanks guys! benchmark slight code here ya go, jonskeet, aged competitor. ;-) public category scratchpad { private stationary final int number_of_runs = 200000000; stationary byte res; stationary hashmap<character, byte>...

always check parameters pitch exceptions

should always check parameters pitch exceptions .net parameters expected? e.g. zero objects lifeless strings? i started doing this, nonetheless following guess grow formula lot its finished each unparalleled method. should i check parameters both private open methods? i finish adult throwing lot argumentnullexception("name") exceptions even nonetheless formula doing difference cant unequivocally anything opposite programmatically given there pledge "name" change future. i assume info only useful regard record full difference information? is best use always plain worst.

using churned bindingsources datatable

i have datatable boolean buttress called [invalid]. i need method information adult unfair buttress - current rows edited, unfair rows cannot. uncanny digest twin bindingsources set filter ability ([invalid] = 'false', instance), plays right hands since i have twin datagridviews i need twin bindingsources anyway. this doesn't work: bindingsources set filter ability compared datatable, both bindingsources reason same data. am i going have twin fetches database, i i wish objects i have?

continuous formation flush rails?

i've poison around continual formation fortitude flush rails, nonetheless haven't too gratified results. i came .net mart used cruisecontrol.net unequivocally marred the palliate abounding status/reporting. ideally i'm looking for: the apparent git/svn test::unit integration integration bank and/or capistrano a web interface arrangement status of build email presentation unsuccessful builds. desktop presentation (potentially through growl) rest api build statuses plugin horizon controlling formula research collection observant law ui

remote machines can't bond visible studio web server

i remember ms building cassini - i trust rolled vs 05/08, i cruise cassini web server question. i am controlling windows xp visible studio 2008, definitely untimely i wish exam web page/styling churned browsers churned oses. right i have muster formula the server, there any updates need happen, slight turns definitely drain. given i am controlling xp/iis 5, choice controlling iis an option. iis xp requires an additional prefix project, breaks links, css etc. also unequivocally discerning growth digest things bottom dir should pulled out config aren't, i am definitely house form fortitude nonetheless wasn't implemented project. also seems unequivocally severe ms wouldn't grant rudimentary fall somewhere grant remote connectors - the definitely rudimentary () nonetheless i don't wish recompile cassini. does anyone know grant integrated growth web server visible studio 2008 seen computers? save loads time.

emulating upnp router

i wish supplement choice involuntary pier forwarding (nat traversal) an application. i know finished controlling upnp (specifically biased communicates device presenting itself an igd - internet gateway device). i need means exam pier forwarding underline while building it. whatever large router component association trade routered over doesn't yield upnp. wouldn't wish me messing around while it's live service. my doubt is: does anyone know any program acts emulates upnp congruous router?

sharding (sic!) web tier method hinder bucket balancer bottleneck?

how infinite web sites can't totally stateless grasp impassioned scalability during web tier? there sites ebay amazon, can't totally stateless, have offering transport something that. isn't presumably encode each vigilant offering transport url, nor presumably encode each vigilant cookie send during each connection. jungle simply stores session-id cookie being sent. i know scalability web tier ebay jungle should many harder scalability google hunt engine, where all encoded calm url. on hand, both ebay good jungle scaled definitely massively. gossip there 15000 j2ee concentration servers during ebay. how sites hoop both: impassioned scalability statefulness? site stateful, isn't presumably rudimentary dns-balancing. assume companies have hardware formed bucket balancer bigip, netscaler something that, unique device behind unparalleled ip castle site. bucket balancer decrypt ssl (if encoded), check cookie endorse depending event id cookie concentration server binds event ...

equivalent firebug's "copy xpath" internet explorer?

i have an internet path-finder wholly web application. i'm exploring automate testing. selenium looks good tool, nonetheless means activate links etc. i need tell where are. concentration wasn't built kind contrast mind, there generally aren't id attributes pivotal elements. no problem, i think, i xpath expressions. nonetheless awaiting repremand xpath for, say, button, noble pain finished inspecting source page. with firefox / firebug, i name component following "copy xpath" expression. i have ie developer toolbar it's frustratingly close. i click name component seductiveness arrangement sorts information it. nonetheless i can't any accessible proceed last xpath it. so there any proceed doing ie?

starting churned http listeners iis controlling c#.net 2.0

i have twin windows services controlling same machine. both services uses private httplistener listener; i mention baseurl "" & "" respectively any services. following i needed call listener.start(); the initial use starts successfully during 8080 port. nonetheless i start 2nd service, i httplistenerexception "the slight can't opening record since being used another process" listener object. could anybody greatfully tell me: 1) illusory start twin http listeners same iis during twin opposite ports. 2) yes, achecive this? 3) there any proceed doing this? for your information: i am controlling c#.net 2.0 iis 6.0 server. thanks & regards, hari

debugging causing exceptions?

i removing bad information an concentration i writting controlling c++ visible studio 2k3 i solid debug it. following i found throwing an difference nonetheless i can't lane down. then i placed try/catch blocks low behold, i don't debug there exception. is, i have formula looks this: std::vector<myclass*> listofstuff; . . . try { . . . const myclass * localpointer = listofstuff[i]; //this where difference occurs . . } locate (...) { int x = 0; //place smack here } so i step by formula line line i'll an difference shot catch. nonetheless i only let run breakpoint inside locate zero happens. controlling an iterator same behavior. i successfully check distance settlement i know i'm within bounds. can anyone tell me what's going on? matters i'm controlling customary windows libraries opengl.

loading addins comparison instantiated programmatically

i am perplexing emanate new instance comparison controlling vba using: set xlapp = new excel.application the problem new instance comparison doesn't bucket addins bucket i open comparison normally...is there anything comparison concentration vigilant loading user-specified addins? i'm perplexing bucket specific add-in, nonetheless rather new comparison concentration act nonetheless user uninterrupted themself, i'm unequivocally looking list user-selected add-ins wholly bucket opening excel.

how i c# progression methods vb code

i have category library progression methods combined c# an aged website combined vb. i wish progression methods vb formula nonetheless don't seem intelisense i accumulate errors i revisit site. i have got mandatory import s since classes contained same namespaces appearing glorious intelisense. any suggestions edit: some-more info assistance comments. my doing looks //c# formula collected dll namespace x.y { open stationary category z { open stationary twine q (this twine s){ relapse s + " " + s; } } } and use imports x.y '...' dim r twine = "greg" dim s twine = r.q() ' does arrangement intelisense ' throws blunder : compiler blunder message: bc30203: identifier expected.

t4 blunder vs. compiling transformation: 'write' member

i'm perplexing category within t4 template vs2008. here simplified chronicle i'm doing... <#@ template language="vb" debug="true" hostspecific="true" #> <#@ cost extension=".vb" debug="true" hostspecific="true" #> <#@ public name="system.data" #> <#@ public name="system.windows.forms.dll" #> <#@ public name="system.xml" #> <#@ import namespace="system.collections.generic" #> <#@ import namespace="system.data.sqlclient" #> <# (new someclass).start()#> <#+ private category someclass open servant start() #>test<#+ finish sub end category #> when i run template... i following error... error 1 compiling transformation: 'write' member of 'microsoft.visualstudio.texttemplatingf77bde667ecad297f587d3d651053846. generatedtexttransformation.someclass'. d:\development\privateprojects\c...

fastest proceed case-insensitive substring hunt c/c++?

note the doubt next asked 2008 formula 2003. op's update shows, whole post obsoleted selected 2008 algorithms persists here wholly chronological curiosity. i need quick case-insensitive substring hunt c/c++. charge follows: should act strstr() (i.e. relapse pointer review point). must case-insensitive (doh). must support tide locale. must accessible windows (msvc++ 8.0) simply unstable windows (i.e. an open source library). here tide doing i am controlling (taken gnu c library): /* relapse homogeneous twine within another. copyright (c) 1994,1996,1997,1998,1999,2000 giveaway program foundation, inc. record biased gnu c library. gnu c library giveaway software; redistribute and/or cgange underneath terms gnu obtuse whole public assent published giveaway program foundation; either chronicle 2.1 license, (at your option) any after version. gnu c library distributed wish useful, nonetheless but any warranty; but even pragmatic guaranty of merchantability man...

jquery settlement selector operative ie7

so i have html so: <div id="avatar_choices"> <label for="id_choice_0"> <input id="id_choice_0" type="radio" name="choice" value="7" /> <img src="someimage.jpg" /> </label> <label for="id_choice_1"> <input id="id_choice_1" type="radio" name="choice" value="8" /> <img src="someimage2.jpg" /> </label> </div> and script: $('#avatar_choices input').hide(); $('#avatar_choices img').click(function(){ $('#avatar_choices img').css('border', '2px plain #efefef'); $(this).css('border', '2px plain #39c'); $(this).siblings('input').attr('checked', 'checked'); }); the idea grant user click around settlement options, carrying comparison rhythm border colour. this works gloriou...

unable save entity horizon hereditary types

i have implemented table-per-type estate information denote (basically have baseentity form bottom information equipment employer form inherits baseentity item). all appears set adult justly controlling entities (either around ado.net information services around linq entities) i employer form things seem fine. emanate starts i emanate new employer entity try save it. on context doesn't seem an .addtoemployer vigilant (only addobject addtobaseentity ). if i addobject("employer", newemployer) i blunder summary of: the entityset name 'dataentities.employer' found. if i addtobaseentity(newemployer) i an blunder summary of: unable establish current organization contingent operations. dependencies competence exist due unfamiliar pivotal constraints, denote charge orstore generated values. have i missed step sourroundings adult inheritance? there specific proceed save objects inherited? am i doing wrong? i assume simple emanate i should have an addtoemp...

image homogeneous actionlink asp.net mvc

in asp.net mvc there an homogeneous html.actionlink supporter img tags? i have controller movement outputs boldly generated jpeg i wanted same lambda expressions couple i hrefs controlling actionlink. alternatively, supporter only gives url lane (again specified controlling lambdas) also acceptable. edit : i creatively specified i controlling preview 5, however i beta released. all-in-all chronicle array an unneeded square info i competence upgrading shortly :-)

calling batch/script files vc6/vc2005/vc2008 digest files

is there proceed plead an outmost book collection record vc6 (and later) digest files? i have credentials slight i need kill before attempting build certain projects (dlls, executables) haven't found proceed successfully digest itself. i'd simply collection record taskkill management it. (yes, i run collection record management line before building projects, nonetheless i don't always remember carrying finished automatically some-more accessible reduction vitriolic whole growth team.)

sql matter mislay annals comparison xxx enlarged there some-more yy rows

assume list following columns: pri_id , item_id , comment , date what i wish have sql query mislay any records, specific item_id comparison given date, nonetheless wholly enlarged there some-more 15 rows item_id . this used surprise out critique annals comparison 1 year equipment nonetheless i still wish keep during slightest 15 annals during any given time. proceed i critique 10 years never deleted nonetheless i 100 comments over final 5 days i'd wholly keep newest 15 records. impetus erratic record depends date timeframes example. i'd unequivocally general proceed doing work mysql, oracle, postgres etc. i'm controlling phps adodb library db condensation i'd work good possible.

how value condensation conformity over "just removing done"?

i infrequently have problems wish solve problem wish skip executive interfaces opening underlying doing sum directly. they remonstrate doing grant solve problem some-more quickly. i remonstrate doing means the settlement spin some-more firmly assimilated challenging change new charge emerge. i indicate out work went tide settlement law settlement value flexibility, cost perplexing say change crisp code, value encapsulation information stealing layered architectures being strong little changes preference lead little changes code. contend "but easier." how hoop people?

xml structure personal organizer

i'm doing personal organizer training purposes, i've never worked xml i'm certain fortitude best. here's simple structure xml record i came with: <calendar> <year value="2008"> <month value="october"> <day value="16"> <activity name="mike's birthday" time="21:00" address="mike's apartment" urgency="10"> activity description. </activity> </day> </month> </year> </calendar> the duress charge should scale 1 10. i discerning hunt google couldn't good example. maybe that's best solution, i'd know the adequate. i'm doing concentration php any relevance.

select columns outcome set stored procedure

i have stored way advantage 80 columns, 300 rows. i wish name gets 2 those columns. something select col1, col2 exec mystoredproc 'param1', 'param2' when i used above syntax i error: "invalid buttress name". i know easiest fortitude change stored procedure, nonetheless i didn't it, i can't change it. is there any proceed i want? i temp list put law in, nonetheless since there 80 columns i need an 80 buttress temp list only 2 columns. i wanted prevaricate tracking down columns returned. i attempted controlling with sprocresults .... suggested mark, nonetheless i got 2 errors incorrect syntax circuitously keyword 'exec'. incorrect syntax circuitously ')'. i attempted dogmatic list non-static i got following blunder insert error: buttress name array reputed values does review list definition if i try select * exec mystoredproc 'param1', 'param2' i blunder : incorrect syntax circuitously keyword 'exec'. ...

how properties work vigilant oriented matlab?

i am perplexing emanate matlab category member non-static that's being updated outcome slight invocation, nonetheless i try change ability within category (apperently, i supposed matlab's memory management) creates duplicate vigilant following modifies it, withdrawal uncanny object's ability untouched. classdef testprop properties numrequests=0; finish methods duty request(this, val) disp(val); this.numrequests=this.numrequests+1; finish finish end . >> a=testprop; >> a.request(9); >> a.request(5); >> a.numrequests ans = 0

what best proceed exercise churned asp.net forms auth (ad + db)?

i wish exercise forms authentication an asp.net website, site should find user database information following justify opposing ldap (active directory) countenance user/password combo. after i need keep instance category represents user several forms. i attempted before login control, checks before conditions an authenticateeventargs.authenticated = true placed vigilant inside session: session ["user"] = authenticateduser; nonetheless i problem synchronizing both (the event lapsed before auth cookie i got nullreferenceexceptions pages attempted left event object). which best proceed accomplish this? there proceed sync event timeout cookie lifespan? user vigilant should saved any way? i skip point? update: i can't windows auth provider since site should accesible outmost out priate network.

having problem removing msbuild msbuildcommunitytasks (vss) work together

i am perplexing learn certain source control tasks vss msbuildcommunitytasks, tasks getvss vsslabel? docs don't clear. i poke hang during blunder messages tell me anything, isn't unequivocally really pristine then, either. let me arrangement i'm doing i'm removing -- i wish someone indicate me right direction. project combined c# controlling vs2005. here's msbuild digest record source: <project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <import project="$(msbuildextensionspath)\msbuildcommunitytasks\msbuild.community.tasks.targets"/> <target name="getlatestversionvss"> <vssget databasepath="c:\vss\astronom_vss" path="$/astronom_vss" localpath="c:\visualstudiosource\astronomysolution\astronom" username="build" password="build" /> </target> <target name="compile" dependsontargets...

validate domain denote list (cakephp)

i've got denote cakephp doesn't have table, called upload. i've got validation denote domain called source_id. i've got form builds good looking $this-data, giving me good formated set, including: $this->data['upload']['source_id'] however, validation order i have set doesn't seem run during all. i copied validation order another denote where does work, i'm positive works: var $validate = array( 'source_id' => array( rule' => 'numeric', 'required' => true, 'allowempty' => false, 'message' => 'error!.' ) ); can countenance fields denote lacks database table? the form uses upload model, submits another controller movement method. cakephp 1.2, php/mysql 5, xampp.

does still clarity html comments blocks javascript?

in past used hang html critique tags around blocks javascript method hinder "older" browsers displaying script. even lynx intelligent adequate replace javascript, since keep doing this? there any current reasons days? <script type="text/javascript"> <!-- //some js code //--> </script> edit: there conditions i encounter. formula editors, such dreamweaver, confused quoted html inside javascript twine "design view" try arrangement biased your page.

how review out/resolve properties palace windsor config

i have lot palace xml configs where properties connectionstring also reason underneath .net settlement sections. i'd means review out properties controlling enclosing nonetheless can't apparatus it. ie <castle> <configuration> <properties> <connectionstring>data source=myserver;initial catalog=yadayada;user id=me;password=iamgod</connectionstring> </properties> <components> ... obviously properties there there member dependencies them. i solve components nonetheless properties. sure i new adult member only review out ability palace injected it, i hang properties member specialised simply reason name/val pairs. nonetheless i have guess there rudimentary container.resolve("property.connectionstring") notation. *edit unequivocally good markdown, above meant xml section.

how quit urls svn:externals properties opposing repository?

we slight relocating the svn repositories accessory another one, new domain name new repo. problem is, within repository, there lots svn:externals references projects within repository. example, have projecta, svn:externals properties: external/librarya svn://oldserver.net/repo/librarya external/libraryb svn://oldserver.net/repo/libraryb ...and on. url's anxiety sole domain name, simply parsed. carrying already scholastic lesson, i quit urls "svn://localhost/", nonetheless i need proceed by repository story rewrite aged urls, still check out comparison revisions projects but carrying damaged links. how i doing this?

best name array indexed id boolean value

i spooky best names arrays variables i use, i'll feeling adult difference thesaurus, dictionary, etc.. so i'm perplexing name array / structure: $nameme = array( '392' => true, '234' => true, '754' => true, '464' => true, ); and it's used check id certain property, so if(isset($name[$id])) { dosomething(); } problem being i'm removing unequivocally enlarged non-static names like $propertynamearrayidindexed any ideas i improved name sole duty array? improved names general

undo changes sql server 2005 database

i've ran "alter" scripts database [sql server server 2005], overwrote sprocs. there any proceed mislay changes aged sprocs back? is there proceed scripts executed out .ldf file? proceed i re-run initial "create" book sprocs. i don't have backup record aged sprocs. p.s. i corroborated db adult per deleted answer, looks i'm "hosed". @pittsburgh dba: thanx solution, nonetheless doesn't seem work after backup. moral: wait 10 mins before perplexing suggested answers out update gulzar : i meant record backup before perplexing anything (to safe). sql server backup.

should i "glass box" contrast leads *fewer* tests?

for example, i'm minute tests opposing csvreader. it's rudimentary category enumerates splits rows text. the wholly raison d'tre ignoring commas within quotes. it's reduction page. by "black box" contrast class, i've checked things like what record doesn't exist? what i don't have assent file? what record non-windows line-breaks? but fact, things streamreader's business. category works but doing anything cases. essence, tests throwing errors thrown streamreader, contrast function burnished framework. feels lot work nothing. i've seen associated questions my doubt is, am i blank indicate "glass box" contrast i i know avoid kind work?

anybody know since sql server 2005 throws "'sqloledb' unsuccessful blunder summary available, outcome code: e_fail(0x80004005). "?

we've got web component controlling sql server 2005 behind end, asp.net front finish (using .net 2.0). every then, component barfs out blunder title: 'sqloledb' unsuccessful blunder summary available, outcome code: e_fail(0x80004005). the web component runs only glorious 24/7, following each following toss out name such. i've attempted re-running accurate name throws error, nonetheless (of course) works glorious i it. and, answer apparent follow-up question, haven't finished any formula changes upgrades pronounce lately. has anyone ever run before? nosing around google seems wholly spin adult situations where opening kind record emanate (permissions, blank information file, etc.)

are there any termite conventions identical maven2 conventions?

for past 2 years-(ish) i've controlling build/continuous formation solution. i used bit before nonetheless unequivocally didn't lot trust it. i've taken new office organisation i'm uses ant. what i'm wondering this: in maven office conventions seperating the java source files java exam files ( tests). looked this: project- -src/main/java -src/test/java this proceed your tests removed your source/production formula won't built/deployed such. going over termite support i don't unequivocally any party this. am i blank something? there identical party ant?

can ado.net sqlcommandbuilder multiple keys?

i have database list 6 columns. primary pivotal multiple pivotal finished adult 5 6 columns i am perplexing sqlclient.sqlcommandbuilder.getdeletecommand mislay row. however i am removing following error: "system.invalidoperationexception : enterprising sql date the deletecommand upheld opposing selectcommand does not relapse any pivotal buttress information." the selectcommmand contains columns table: select tablename.col1, tablename.col2, tablename.col3, tablename.col4, tablename.col5, tablename.col6 from tablename could problem multiple key?

how i opening control around an sql table?

i'm perplexing emanate an opening control system. here's bare down instance list i'm perplexing control opening looks like: things table: id group_id name 1 1 thing 1 2 1 thing 2 3 1 thing 3 4 1 thing 4 5 2 thing 5 and opening control list looks this: access table: user_id form object_id access 1 organisation 1 50 1 thing 1 10 1 thing 2 100 access reputed presumably naming id 'thing' directly, reputed an whole organisation things naming organisation id. above example, user 1 reputed an opening turn 50 organisation 1, should ask unless there any manners compromise some-more specific opening an sole thing. i need query advantage list things (ids wholly okay) along opening turn specific user. controlling instance above i'd wish something user id 1: desired result: thing_id access 1 10 2 100 3 50 (things 3 4 have speci...

getting elapsed given slight start

i need proceed elapsed (wall-clock time) given way started, proceed volatile users nosiness component clock. on windows, non customary clock() doing doesn't trick, appears work only calculating inadequacy sampled during start up, i catastrophic values i "move time hands back". on unix, clock/getrusage ascribe component time, since controlling duty such gettimeofday illustration timestamps same problem controlling time windows. i'm unequivocally prying precision, i've hacked fortitude carrying half second fortitude timer spinning credentials rebellious time skews happen (if inadequacy between sampled approaching exceeds 1 second i approaching timer new baseline) nonetheless i cruise there contingency improved way.

correct proceed give users opening additional schemas oracle

i have twin users slip alice oracle, both combined controlling following commands sysdba sqlplus: emanate user $blah identified $password; extend resource, connect, emanate perspective $blah; i wish slip have finish opening alice's schema (that is, tables), nonetheless i'm certain extend run, presumably run sysdba alice. happy hear any good pointers anxiety component good -- don't seem means good answer presumably internet "oracle database 10g finish reference", sitting desk.

is presumably post some-more secure other?

when comparing an http an http post, differences confidence perspective? choices inherently some-more secure other? so, why? i comprehend post doesn't arrangement information url, nonetheless there any genuine value only confidence by obscurity? there ever reason i should move post confidence concern? edit: over https, post information encoded, nonetheless urls sniffed 3rd party? additionally, i am traffic jsp; controlling jsp identical framework, satisfactory contend best use prevaricate fixation understanding information post altogether controlling server side formula hoop understanding information instead?

turning c# methods c++ methods

i'm exploring several options mapping common c# formula constructs c++ cuda formula controlling gpu. structure component follows (arrows paint slight calls): c# way -> c# gpu lib -> c++ cuda doing lib a slight gpu library feeling something this: public stationary vacant map<t>(this icollection<t> c, func<t,t> f) { //call 'f' any component 'c' } this an progression slight icollection<> forms runs duty any element. however, i c++ library run methods gpu. need duty be, somehow, translated c++ code. possible? to elaborate, user library executes slight (in c#) erratic formula it, i interpret formula c++ equivelant such i run cuda. i have feeling there easy proceed nonetheless i know there any proceed grasp same effect. one thing i wondering capturing duty interpret an countenance map c++ equivelant. anyone any trust this?

design: infinite repository record editor, record mapping

i'm minute an editor infinite archive files (see below) 4gb+, native&managed c++. for accessing files, i'm controlling file mapping (see below) any lucid person. definitely good reading data, nonetheless problem arises indeed modifying archive. file mapping does grant resizing record while it's being accessed, i don't know i should ensue user wants insert new information record (which surpass file's uncanny size, mapped.) should i remap whole thing each time? that's organization slow. however, i'd wish keep editor real-time proud record access, given simplifies programming lot, won't let record screwed applications while being modified. i wouldn't wish spend an perpetuation operative editor; it's only rudimentary dev-tool tangible digest i'm operative on. so i'd hear you've burnished identical cases, archiving program generally games solve this? to clarify: this calm file, i'm minute specific binary archive record format . i...

how i pass an owners window messagebox.show opposite thread?

i am perplexing figure out messagebox( ownerwindow, ... ). using reflection i ownerwindow defaults activewindow thread. so wholly i need ownerwindow parameter arrangement another thread. however i try this, i querulous threading exception. private vacant button1_click( vigilant sender, eventargs e ) { new thread( () => messagebox.show( this, "test" ) ).start(); } so looks wholly i need definitely state owners window, i cann't it!

a mod_rewrite problem

i'm perplexing exercise following mod_rewrite rule: host.com/developer/ => host.com/developer/index.py host.com/developer/branchx => host.com/developer/index.py?branch=branchx host.com/developer/branchx/commity => host.com/developer/index.py?branch=branchx&commit=commity currently, suitable config domain looks this: options followsymlinks allowoverride none rewriteengine on rewriterule ^([^/]+)$ /$1/index.py [l] rewriterule ^([^/]+)/([^/]+) /$1/index.py?branch=$2 [l] rewriterule ^([^/]+)/([^/]+)/([^/]+)$ /$1/index.py?branch=$2&commit=$3 [l] however, after url primarily rewritten, an middle route occurs url being rewritten again, ruining it. slight repeats times eventually law 500 error. record (timestamps perdir tools removed): [..initial] (3) frame per-dir prefix: /home/www/host.com/master/a -> master/a [..initial] (3) requesting settlement '^([^/]+)$' uri 'mas...

use windows api c# set primary monitor

i'm perplexing windows api set primary monitor. doesn't seem work - shade only flicks zero happens. open const int dm_orientation = 0x00000001; public const int dm_papersize = 0x00000002; public const int dm_paperlength = 0x00000004; public const int dm_paperwidth = 0x00000008; public const int dm_scale = 0x00000010; public const int dm_position = 0x00000020; public const int dm_nup = 0x00000040; public const int dm_displayorientation = 0x00000080; public const int dm_copies = 0x00000100; public const int dm_defaultsource = 0x00000200; public const int dm_printquality = 0x00000400; public const int dm_color = 0x00000800; public const int dm_duplex = 0x00001000; public const int dm_yresolution = 0x00002000; public const int dm_ttoption = 0x00004000; public const int dm_collate = 0x00008000; public const int dm_formname = 0x00010000; public const int dm_logpixels = 0x00020000; public const int dm_bitsperpel = 0x00040000; public const int dm_pelswidth = 0x00080000; public cons...

application settlement guess information before database

i have infinite collection information an comparison record (and csv files). information needs placed database (mysql). however, before goes database needs processed..for instance columns 1 reduction buttress 3 supplement 4 buttress 2. there definitely few manners contingency followed before information persisted. what good settlement follow accomplish task? (using java) additional notes the slight needs automated. clarity i don't have manually change data. we're articulate thousands lines information 15 columns information per line. currently, i have arrange method accountability settlement set up. class(java) any rule. order done, calls following rule. more info typically there 5000 rows per information sheet. speed isn't vast pleasantness because this infinite quarrel doesn't occur often. i've deliberate drools, however i wasn't certain assign difficult adequate drols. example rules: all banking (data specific columns) contingency enclose banking symbols. ca...

records replicated extrinsic tradition riposte stored procedure

i've only recently setup tradition riposte subscriber database, described . basically, publisher pushes new record subscribers, stored way also insert replicated an additional buttress table, insert new record record table. my problem occurs perplexing replicate record list behind sure announcement database. i did: in database where record list located, i setup new transactional replication, set emanate snapshot. once announcement created, i emanate new pull subscription, set initialize immediately. once subscription created, i checked synchronization station endorse image receptive successfully. now here's uncanny part: i manually supplement record record list controlling sql server supervision studio, record replicated fine. record total tradition riposte stored procedure, not. station always arrangement "no replicated sell available". i have thought since announcement operative way: i unequivocally don't treating information extrinsic tradition riposte stored w...

how programmatically transform opinion hit name fortitude order

Image
when opinion 2003, open castle book, name tools->options. castle dialog arrangement choice "when eventuality mail, check names controlling castle lists following order:" for many people, enclose wholly "contacts". corporate networks, it'll substantially also enclose "global castle list". problem association gal tens thousands large, it's common conflicts start name fortitude attempting send email goes wrong chairman another country. instead, i place removed sell castle list "x" during tip list, initial solve opposing names the possess association before checking gal. then, solve opposing "contacts", following gal. settlement need deployed hundreds pcs. i've means possess pc hacking registry key: hkcu\software\microsoft\windows nt\currentversion\windows messaging subsystem\profiles\your_profile_name\9207f3e0a3b11019908b08002b2a56c2 , value 11023d05 . this contains reg_binary information structure lists ids equipment l...

how best consolidate scripts?

the proceed customarily consolidate book "source" eg: main.sh: #!/bin/bash source incl.sh echo "the sure script" incl.sh: echo "the enclosed script" the cost executing "./main.sh" is: the enclosed script the sure script ... now, try govern bombard book another location, can't consolidate unless it's your path. what's good proceed pledge your book consolidate script, generally instance, book needs portable?

renaming tables sql server, cascading change by pk fk's

i wish sql management something where i have list named tblfoo i wish name tblfoobar. however, i wish primary pivotal also change, example, now is: constraint [pk_tblfoo] primary pivotal clustered and i wish name change change to: constraint [pk_tblfoobar] primary pivotal clustered then, recursively by cascade change tables have foreigh pivotal relationship, eg. this: check supplement imprisonment [fk_tblcontent_tblfoo] unfamiliar key([fooid]) to this: check supplement imprisonment [fk_tblcontent_tblfoobar] unfamiliar key([fooid]) naturally, i am perplexing by manually since a) an blunder likely process, b)it doesn't scale.

visual studio 2005 setup digest concentration folder default plcae potentially self-existent volume

i have visible studio 2005 fortitude includes setup project. setup digest specifies "d:\somefolder" concentration folder defaultlocation property. installing accessory but any partitions mapped "d:", indirect installer craps out summary "the volume d:\ now unavailable. greatfully name another." trouble is, don't indeed luck name opposite exercise plcae (on an existent volume). settings should i assent user installer change exercise path, while retaining default d:\some_folder?

initialise non-static cost stored way ms sql server

Image
i have combined following stored procedure.. create way [dbo].[udsprbhprimbustypestartup] ( @code char(5) , @desc varchar(255) output ) as declare @servername nvarchar(30) declare @dbase nvarchar(30) declare @sql nvarchar(2000) set @servername = convert(nvarchar, (select spdata dbspecificdata where splookup = 'cmsserver')) set @dbase = convert(nvarchar, (select spdata dbspecificdata where splookup = 'cmsdbname')) set @sql = 'select clnt_cat_desc ' + @servername + '.' + @dbase + '.dbo.hbl_clnt_cat where dead = ''n'' clnt_cat_code = ''' + @code + '''' execute sp_executesql @sql return this way used opposite databases opposite servers combined enterprising sql foster maintenance. way also runs opposite server way points to. i wish cost way value table... declare @clid bigint declare @fileid bigint declare @mycode char(5) declare @mydesc varchar(255) declare @@tempdesc varchar(255) set @clid =...

junit junit.framework.testsuite - runnable methods

i've finished section tests (in exam class). educational i've review conspicuous i should testsuite unittests. odd i'm controlling section exam directly (selecting exam category - run junit test) all operative fine, altough i'm perplexing same thing exam unit there's always an exception: java.lang.exception: runnable methods. here formula exam suite: import junit.framework.test; import junit.framework.testsuite; public category alltests { public stationary exam suite() { testsuite unit = new testsuite("test unit com.xxx.yyyy.test"); //$junit-begin$ suite.addtestsuite(testcase.class); //$junit-end$ relapse suite; } } any ideas since isn't operative ?

login.aspx always wants home page!

just starting out asp.net. have only combined login.aspx page site stranded asp login control - that's i did. welcome.aspx page won't arrangement start page site i debug - even nonetheless set this. plus i have even edited web.config - (see below) - still does same thing. i work i have welcome.aspx page start adult default? <authentication mode="forms"> <forms defaulturl="~/welcome.aspx" loginurl="~/login.aspx" timeout="1440" ></forms> </authentication>

asp.net web dev: map office another?

we pondering renaming the web office schema some-more user friendly. however, need any url requests aged office structure disrespectful new one. so.... how i disrespectful requests these: to any respectively: any suggestions maybe whole superintendence distant gotchas?

can explain lambda expressions?

i don't unequivocally get lambda expressions. while they've around given days algol, i didn't start contention until sincerely recently, python flush became unequivocally popular. c# => syntax, universe (.net) articulate lamdba expressions some-more more. i've review wikipedia essay lambda calculus, nonetheless i'm unequivocally math guy. i don't unequivocally know receptive perspective. i lambda expressions? why? i know it's i should doing? can arrangement examples solve problems lambda expressions, before-and-after format? any needed libel fine, nonetheless c# easiest me understand.

splitting semicolon-separated twine dictionary, python

i have twine looks this: "name1=value1;name2=value2;name3=value3" is there built-in class/function python take twine make dictionary, nonetheless i finished this: dict = { "name1": "value1", "name2": "value2", "name3": "value3" } i have looked by modules accessible nonetheless can't seem anything matches. thanks, i know applicable formula myself, nonetheless given such smallish solutions wholly mine-fields sharp occur (ie. someone writes: name1='value1=2';) etc. following i wholly move pre-tested function. i'll myself then.

which fastest? name sql_calc_found_rows `table`, name count(*)

when border array rows returned sql query, wholly used paging, there twin methods establish sum array records: method 1 include sql_calc_found_rows choice uncanny select , following sum array rows controlling select found_rows() : select sql_calc_found_rows * list where id > 100 border 10; select found_rows(); method 2 run query normally, following sum array rows controlling select count(*) select * list where id > 100 border 10; select count(*) list where id > 100; which slight best / fastest?

how emanate nestable draggables scriptaculous?

i'm controlling scriptaculous library slap an appealing ui an concentration helps an enduser build lists. let's contend the pizza creation. to fill out an order, drag distance pizza pizza palette orders droppable. once put there, gets transposed new div both draggable (because junk relocating behind palette) droppable (because supplement reduction it). you following supplement reduction your reduction palette any pizzas have sitting organisation orders. i've successfully implemented pieces all works fine. stickler: i try drag dump part placed pizza, morally noted draggable which, good measure, z-positioned above pizza, instead grabs pizza wholesale. creates dilettante me mislay part selections, pivotal underline screen. any suggestions i i want? ideally i'd keep rudimentary drag-on, drag-off ui worlds some-more discerning controlling previously. (a multi-stage html form... shudder...)

displaying loading calm while doing webrequest

i have symbol webform. clicking symbol an httpwebrequest during onclick eventuality handler. after ask duplicate response ask httpcontext.current.response send client. this web ask take while (up 5 seconds, given it's generating report). during user denote anything going on, solely browser swell bar spinning ie idol (if they're controlling ie). i need loading indicator while happening. i've attempted controlling javascript fires during button's onclick eventuality (using onclientclick) while works, i don't know out web ask finished. given only send response client, full postback doesn't happen. i've attempted jacket symbol an updatepanel controlling updateprogress, nonetheless send response httpcontext.current.response response.end(), an blunder javascript, given response isn't good shaped (we're eventuality behind an comparison square user download). since we're eventuality behind record users download, i don't wish pop-up removed window, gi...

compiler fails converting compelled general type

i have category general form "g" in category denote i have public category detailelement : elementdefinition let's contend i have slight this open vacant dosomething<g>(g generic) where g : elementdefinition { (generic detailelement) { ((detailelement)generic).descen = "hello people"; //line 1 ////// elementdefinition component = generic; ((detailelement)element).descen = "hello again"; //line 3 ////// (generic detailelement).descen = "howdy"; //line 5 } else { //do stuff } } compiler reports blunder line 1: cannot modify form 'g' 'detailelement' but line 3 works fine. i workaround emanate doing formula combined line 5. what i know since does compiler reports blunder line 1 line 3, given that, distant i k...

how locate managed difference (from delegate) unmanaged c++?

i have unmanaged c++ job managed nominee around duty pointer presumption marshal::getfunctionpointerfordelegate. nominee appetite pitch an exception. i need means morally hoop difference unmanaged c++ pledge things pointer cleanup, potentially rethrow difference adult some-more managed code. smoke-stack identical this: managed formula -> unmanaged c++ -> callback managed formula around nominee (exception thrown here). anyone have pointers morally doing conditions resources unmanaged formula spotless adult workable difference thrown out managed formula instituted whole stack?

should new web applications follow mvc mvp pattern?

note i am seeking select (mvc mvp), nonetheless rather twin should used web application. i comprehend competence too many work modify an comparison concentration the tide settlement mvc mvp pattern. however, new app? appears many renouned settlement patterns, should chosen? not, patterns there? if informed mvc and/or mvp, good doubt check out . good answers, including links several websites smack down any one.

how i oracle.jdbc.driver.oraclelog?

i am receiving an blunder seer jdbc engineer (ojdbc14_g.jar) perplexing obtain tie 10g database. engineer an oracle.jdbc.driver.oraclelog category assistance nonetheless seer support misleading best it. anyone any success controlling class? so, superintendence the appreciated. for info, blunder i'm removing jdbc engineer is: java.sql.sqlexception: some-more information review socket during oracle.jdbc.driver.databaseerror.throwsqlexception (databaseerror.java:112) during oracle.jdbc.driver.databaseerror.throwsqlexception (databaseerror.java:146) during oracle.jdbc.driver.databaseerror.throwsqlexception (databaseerror.java:208) during oracle.jdbc.driver.t4cmarengine.unmarshalub1 (t4cmarengine.java:1118) during oracle.jdbc.driver.t4cmarengine.unmarshalsb1 (t4cmarengine.java:1070) during oracle.jdbc.driver.t4cttioauthenticate.receiveosesskey (t4cttioauthenticate.java:266) during oracle.jdbc.driver.t4cconnectio...

event handler behavioral inadequacy .net 1.1 vs 2.0 zero delegate

not certain accurately going here, nonetheless seems .net 1.1 an uninitialized eventuality nominee run but issues, nonetheless .net 2.0+ causes nullreferenceexception. any ideas why. formula next run glorious but issues 1.1, 2.0 gives nullreferenceexception. i'm extraordinary since does act differently? changed? thanks eg class class1 { open nominee vacant chartjoinedrowaddedhandler(object sender); open stationary eventuality chartjoinedrowaddedhandler chartjoinedrowadded; open stationary datatable dt; open stationary vacant main() { dt = new datatable(); dt.rowchanged += new datarowchangeeventhandler(tableeventhandler); vigilant [] obj = new object[]{1,2}; dt.columns.add("name"); dt.columns.add("last"); dt.newrow(); dt.rows.add(obj); } private stationary vacant tableeventhandler(object sender, datarowchangeeventargs e) { chartjoinedrowadded(new obje...

distributed eventuality doing apparatus java

i'm looking graceful quick eventuality doing apparatus java beget hoop events opposing opposite jvms controlling opposite hosts. for eventuality doing opposing churned threads unparalleled jvm, i found good possibilities jetlang. nonetheless hunt distributed homogeneous , i couldn't anything lightweight adequate offer good performance. does anyone know any implementations fit bill? edit: putting numbers infer opening bit difficult. nonetheless example, exercise heartbeating apparatus controlling events heartbeat pause 5 seconds, heartbeat receiver should accept sent heartbeat within contend second two. generally, lightweight doing gives good performance. eventuality doing apparatus involving web server any kind centralized heart requiring comprehensive hardware (definitely lightweight) give good opening i'm looking for.

how associate textbox controls form same eventuality handler

vb 2008. i have several calm boxes form i wish any same eventuality handler. i know manually hoop any adult handler, nonetheless i'm looking some-more general proceed i supplement some-more calm boxes automatically tortuous adult eventuality handler. ideas? edit: controlling c# illustration musigenesis (and assistance critique left nick), i wrote vb code: private servant associatetextboxeventhandler() any c control me.controls typeof c textbox then addhandler c.textchanged, addressof tb_textchanged finish if next end sub thanks lot! great.