Posts

Showing posts from September, 2012

Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

.net - EF CodeFirst CTP5 with Repository and UnitOfWork: System.InvalidOperationException (...not part of... ...current context...) -

i'm testing ef codefirst ctp5 , trying implement unit of work , repository patterns. when run simple test get: system.invalidoperationexception : entity type log not part of model current context. the database get's created ef , fails when call .add() seems same context not being used can't figure out why? hoping smart human coming rescue me! in advance taking time. here code: logcabincontext public class logcabincontext : dbcontext, iunitofwork { public logcabincontext() { } public logcabincontext(string nameorconnectionstring) : base(nameorconnectionstring) { } #region iunitofwork members public void save() { base.savechanges(); } #endregion } baserepository public class baserepository<t> : ibaserepository<t> t : entitybase { public logcabincontext _unitofwork; private dbset<t> _dbset; public baserepository(iunitofwork unitofwork) { if (unitofwork == n

How to iterate through a column in an Excel application through C# Console? -

i have created console application reads excel file. want take of document numbers , place in array searching purposes. able find cell contains data "documentnumber" e.g. $f$5. how can iterate through rows within column f? have following code: public static void main(string[] args) { string address; string next; try { excel.applicationclass excel = new excel.applicationclass(); excel.workbook workbook = excel.workbooks.open(@"d:\sample.xls", missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value, missing.value); excel.worksheet worksheet = (excel.worksheet)workbook.sheets["sheet1"]; excel.range docnumber = worksheet.cells.find("documentnumber", worksheet.cells[1, 1], excel.x

Debugging external dll with Delphi -

i @ real symbols external dll compiled bcc (bcc32) inside delphi debugging. problem seems bcc allows externals symbols (tds file) , delphi not see symbols. there way force bcc32/ilink32 embed symbols inside dll or delphi understand dll tds symbols? thank you, max try project using c++ builder: allows integrate delphi , c++ code in 1 project (or have multiple projects in 1 project group: c++ dll , delphi host). since use same debugging format, way easier debug.

c# - Global hotkeys in WPF? -

i've build wpf application , want add global hotkey support. want able execute method in application anywhere in windows, when application minimized or running in tray. example, execute method ctrl + alt + t. is possible in wpf, , if so, how? you need take @ registerhotkey in user32.dll. here's example @ pinvoke.net: http://www.pinvoke.net/default.aspx/user32/registerhotkey.html

escaping - using quotes in cucumber/capybara scenario -

here step, , capybara doesn't seem escape thats why it's showing as: and should see 'height (e.g. 5\'11\")' then /^i should see 'height (e.g. (\d+)\'(\d+)\")'$/ |arg1, arg2| pending # express regexp above code wish had end i need check page if has string. capybara limitation? or escaping wrong? looks cucumber unable generate proper regexp such string. cucumber works multiline strings . can implement following code: # web_steps.rb /^(?:|i )should see following text:$/ |text| page.should have_content(text) end # in scenario ... , should see following text: """ height (e.g. 5'11") """ it works me. hope too.

c# - Cannot implicitly convert type 'double' to 'long' -

in code got above error in lines commented. public double bigzarb(long u, long v) { double n; long x; long y; long w; long z; string[] = textbox7.text.split(','); long[] nums = new long[i.length]; (int counter = 0; counter < i.length; counter++) { nums[counter] = convert.toint32(i[counter]); } u = nums[0]; int firstdigits = convert.toint32(math.floor(math.log10(u) + 1)); v = nums[1]; int seconddigits = convert.toint32(math.floor(math.log10(v) + 1)); if (firstdigits >= seconddigits) { n = firstdigits; } else { n = seconddigits; } if (u == 0 || v == 0) { messagebox.show("the multiply 0"); } int intn = convert.toint32(n); if (intn <= 3) { long uv = u * v; string struv = uv.tostring(); messagebox.show(struv); return uv; } else { int m =convert.toint32(math.floor

java - How to adjust my code to this situation for SAX XML parsing in Android -

on advice on here on stackoverflow changed method of parsing saxparser. thanks different tutorials i'm able work, , have work faster (which important app). the problem, however, xml file goes deeper tutorial's example xml's i've seen. this sample of xml file: <message> <service>servicename</service> <insurances> <breakdowninsurance> <name>insurance name</name> <insurancenr/> <licensenr/> </breakdowninsurance> <cardamageinsurance> <name>insurance name 2</name> <insurancenr></insurancenr> </cardamageinsurance> </insurances> <personal> <name>my name</name> </personal> </message> i can personal details name, code doesn't seem work insurances. think because it's 1 node more. this code i'm using in handler class: @override public void startelem

javascript - About object's property name -

how add property object when property name come var? var obj={}; var propname="realname"; obj.propname; //wrong obj."realname"; //wrong you can use square bracket notation : var obj = {}; var propname = "realname"; obj[propname] = "foo"; // same `obj.realname = "foo";`

c# - Thread wait on file input pattern -

what's normal pattern thread wait file input in c# when reaches end of file , needs wait. particularly way of coding it, neat , elegant. thanks. bob. not pattern filesystemwatcher ( http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx ) might come in handy.

C++ methods for network protocol parsing -

i looking strategy people use in c++/c parse complex binary network protocols (such dns). tips , articles great. google protocol buffers appears support types python struct() can handle. supports python too. welcome developer documentation protocol buffers – language-neutral, platform-neutral, extensible way of serializing structured data use in communications protocols, data storage, , more.

Syntax highlighting of C function calls in emacs -

i use custom syntax highlighting theme c in emacs, i'm missing possibility of highlighting function calls. example: int func(int foo) { return foo; } void main() { int bar = func(3); } is there way highlight call "func" in example? doesn't matter if macros highlighted too. keywords if, switch or sizeof should not match. thanks! the order of entries in keyword list significant. if put entries after ones highlight keywords , function declarations, these won't matched. (font-lock-add-keywords 'c-mode '(("\\(\\w+\\)\\s-*\(" (1 rumpsteak-font-lock-function-call-face))) t) alternatively, can use function instead of regexp matcher . overkill question if you've stated requirements exactly, useful in harder cases. untested (typed directly in browser, in fact, don't guarantee balanced parentheses). (defun rumpsteak-match-function-call (&optional limit) (while (and (search-forward-regexp "\\(\\w+\

web services - recover lost C# pages -

i had problem lost source(cs) of web site pages had published pages on server ,so please if there way recover theses published pages orignal pages code,bin folder you need decompile c#. advanced user scenario, can done... sort of. how decompile .net exe readable c# source code?

iphone - a simple person class in objective c -

i'm starting learn objective c, made simple person class, 6 errors, expected specifier-qualifier-list before '-' token just wondering if can explain me i'm doing wrong, thanks #import <foundation/foundation.h> #import <foundation/nsobject.h> #import <foundation/nsstring.h> @interface person:nsobject { nsstring *firstname; nsstring *lastname; -(void) setfname:(nsstring *) thefirstname; -(void) setlname:(nsstring *) thelastname; -(void) printname; } @end @implementation person { -(void) setfname:(nsstring *) thefirstname { firstname = [[nsstring alloc]initwithstring: thefirstname]; } -(void) setlname:(nsstring *) thelastname { lastname = [[nsstring alloc]initwithstring: thelastname]; } -(void) printname { nslog(@"the person's full name is",firstname,lastname); } } @end int main (int argc, const char * argv[]) { nsautoreleasepool * pool

image - Android: application crashes on Picture.createFromStream() -

my app displays series of pictures. memory reasons, want serialize these pictures when not in use. serialization seems work (doesn't throw exceptions or crash), application crashes on picture.createfromstream() call. can't find informative in logcat output, nor failed call throw throwable. advice? 12-20 10:48:37.121: warn/inputmanagerservice(53): window focused, ignoring focus gain of: com.android.internal.view.iinputmethodclient$stub$proxy@438abe88 12-20 10:48:37.132: debug/dalvikvm(53): threadid=17: bogus mon 1+0>0; adjusting 12-20 10:48:50.901: debug/dalvikvm(238): gc freed 15257 objects / 1725344 bytes in 99ms 12-20 10:50:26.912: debug/dalvikvm(238): gc freed 29 objects / 1200 bytes in 56ms 12-20 10:51:03.661: info/debug(28): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 12-20 10:51:03.661: info/debug(28): build fingerprint: 'generic/sdk/generic/:1.6/donut/20842:eng/test-keys' 12-20 10:51:03.661: info/debug(28): pid: 238, tid: 238 >

google static maps API : mobile -

i using static "google static maps api" on mobile j2me when use on emulator on pc .... retrieve map successfully but when use mobile give me following exception: illegal argument exception does body have solution problem request url: http://maps.google.com/maps/api/staticmap?zoom=6&size=240x229&markers=color:blue|label:l|63.279591,-144.967969&sensor=false thanks i found solution ttl in nokia mobile http connection not recognize "|" add url encoded symbol: "%7c" , should work probably

Easiest way to deploy a Rails 3 app? -

i finished first ruby on rails application , put online. easiest way go doing this? you should try use http://heroku.com/ far 1 of easiest ways have app running online in 5 mins.

php - problems exporting Solar php5 root directory from localhost to live server or even other computer -

ok, seems obvious, haven't been able figure out. i started using solar php5 framework http://solarphp.com . great php5 framework. new framework learning curve. issue: solar uses many pre-written scripts make directories , files you. making easy rapidly deploy site. being uses these scripts, makes symbolic links files , directories. (example: chapter 1 in manual) great until need export entire root directory upload server or make instance on development computer. problem me is, when this, files editable, not reflect changes when refresh page. doesn't update code. way can accomplish changes or updates, (essentially) run site set-up each time, involves running setup scripts, setting db connections, etc. total pain. question there advice out there on doing can export working root directory, upload server or other dev machine, without having run scripts on , on again. know easy not know search for. is method exporting directories/files use symbolic links? you

c# - How to query a bag with Nhibernate -

i need publications country list doesn't contain country (research on isocode2) the sql query : select * pub_head ph not exists (select 1 pub_head_forbidden_country phfc , country c phfc.pub_head_id = ph.pub_head_id , phfc.country_id = c.country_id , c.iso_code2 = 'ca'); and model : <class name="publication" table="pub_head"> <id name="id" column="pub_head_id"> <generator class="native"> <param name="sequence">seq_pub_head</param> </generator> </id> <idbag name="countries" table="pub_head_country" lazy="true"> <collection-id column="pub_head_country_id"> <generator class="native"> <param name="sequence">seq_pub_head_country</param> </generator> </collection-id> <key col

objective c - Are there any example on how to write full-screen apps for Mac OS X in Ojective-C with Cocoa? -

could point me examples on how write full-screen apps mac os x in ojective-c cocoa? add following code nsview want make fullscreen: [view enterfullscreenmode:[nsscreen mainscreen] withoptions:nil]; it's same, thing need watch if have nswindow specific code... http://developer.apple.com/library/mac/#documentation/cocoa/reference/applicationkit/classes/nsview_class/reference/nsview.html

c# - WPF Binding Issue - UI Updates, Object Does Not -

i'm having yet wpf binding issue. when think i've got stuff figured out, run more problems... :s anyway... i've created custom user control selecting files. it's simple textbox followed button contained within grid. property of control working called filepath , textbox on control bound property. when button clicked, savefiledialog opened , user selects file. ui correctly updates after user selects file. the problem seem having when bind object control (in instance have object documentfilepath property) object doesn't update when new file selected. here's relevant code within user control: public static readonly dependencyproperty filepathproperty = dependencyproperty.register("filepath", typeof(string), typeof(filesave), new uipropertymetadata(string.empty, onfilepathchanged)); public string filepath { { return this.getvalue(filepathproperty) string; } set { this.setvalue(filepathproperty, value);

c# - Why does this happen IEnumerable versus List -

i have following bl method public static void somemethod (list<someclass> group) { ienumerable<someclass> groupwithfalse =(from someclass gr in group gr.someprop== false select gr); foreach (someclass grfalse in groupwithfalse) { grfalse.save(); } if (groupwithfalse.any()) { // stuff } } the mock implementation dl saving (which cannot changed used in lot of unit tests) is: public void save() { group.someprop = true; } if try unit test last statement of flow e.g if (groupwithfalse.any()) statement fails, apparently there no more elements property set false. if change code in business logic : public static void somemethod (list<someclass> group) { list<someclass> groupwithfalse = new list<someclass>(); foreach (var g in group) { if (g.someprop == false) groupwithfalse.add(g); }

javascript - Triggering Instance methods by firing the Parent method -

what best way fire method in many children calling parent's method? for example, lets have parent object foo has many instances: barx, bary, etc. foo = function(){ x = null; y = null; move = function(){ x += 1; y += 1; }; } barx = new foo(); barx.x = 50; barx.y = 50; bary = new foo(); bary.x = 200; bary.y = 200; is there easy way fire off move function in instances? limited looping through instances , firing off function or can somehow fire function in foo , have trickle down , fire off instances extend foo? no. more clever it. make static moveall function on foo . examples make things clearer. here fiddle . var foo = function(x, y){ this.x = x; this.y = y; this.move = function(){ x += 1; y += 1; alert(x + ' ' + ' ' + y); }; foo.instances.push(this); // add instance foo collection on init }; foo.instances = []; foo.moveall = function(){ for(var = 0; < foo.instances.length; i++)

Flex App Embedded in Rails App w/Authentication -

we have rails 3 app using session-based authentication (modified acts_as_authenticated), , flex app needs embedded in html.erb template. flex app needs access routes have before_filter set check if user logged in. when interacting html site, causes user redirected login page, sets rails session property (tied cookie) record user logged in when making future requests. the flex app needs access xml that's generated rails (behind before_filter) , don't want force user log in twice -- should passing flash parameter flex app can present "already logged in" if session exists (ie, user has logged in via html interface)? haven't dealt kind of problem before i'm not sure if i'm asking right question. advice appreciated! integrating flash authenticated service can tricky. can't rely on normal http sessions or cookies manage authentication you. regarded best practice generate unique token each logged in user pass on every request server prove in

sql - Polling MySQL database through Qt / QSqlTableModel (C++) -

i'm using qt connect mysql database (through qsqltablemodel / qsqldatabase / etc) although question more general. what's best way "live updating database table view"? 1 option poll entire table (repeatedly calling select() method in qsqltablemodel). seems inefficient though (is entire table passed mysql qt each time?) another option have table, acts log table (keeps track of updates / changes) , can poll log table (checking new entries..which seems more efficient?). however, lose lot of qsql built in functionality). or should have counter variable poll, , if increases, know refresh entire table? all these approaches seem bit messy.. recommend? thanks. this mysql question have answer! :) what want in fact poll database every x seconds. however, make efficient if make mysql "trigger" if row inserted, updated, and/or deleted create indicator. i think should create trigger insert modified row second table. poll qt program should these

Need help with: jquery prepend doctype to html -

here's situation: i editing application's css style sheet. i can edit css style sheet (unless can creatively glom onto file using css, or possibly add small jquery prepend statement in existing .js) application ie6, ie7 , ie8 compliant. never use firefox, , it's not option. looking with: 1) think need use jquery "prepend/prependto" "doctype " on to html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" without !doctype throws ie8 quirksmode , of course doesn't accept styles such "input[type=checkbox]" i have not used prepend before. can me full , correct syntax on how make following: current: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> desired: <doctype html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> this has not worked me yet $("html ").prepend("

css - What is the conditional code to affect IE8 browser? -

i don't mean conditional comments embedded html. refering conditional code can put directly css file. like: *+html .myclass {} ie7 * html .myclass {} ie 6 what 1 ie 8? what trying achieve? shouldn't have hack css ie8. don't think there conditional code ie8 if absolutely need have style sheet ie8, might have turn conditional comment. <!--[if ie 8]> <link href="ie8css.css" rel="stylesheet" type="text/css" /> <![endif]-->

active directory - unique X500 Object Id not being generated, while creating new Attribute in AD schema -

we trying extend activedirectory schema add couple of variables. when create attribute in adschema editor, unique x500 object id not being generated default. how resolve issue ? out unique identifier, cannot create new attributes in ad. logged in administrator, windows server 2008 r2 i apologize confusion. looks unique x500 object never gets auto-generated in ad when creating new attribute. (even though have strange feeling have seen in past). either way, below links gives elaborate explanation of unique x500 object & how can obtain new one, answers question. obtaining object identifier microsoft : http://msdn.microsoft.com/en-us/library/ms677620.aspx

windows phone 7 - On WP7 & Computer, Playing first playlist Item automatically using SMF (Silverlight Media Framework) -

i have smoothstreaming video comming wowza server , using smf play video on windows phone 7 , on computer. adding manifest playlist , setting to playlistitem { deliverymethod = deliverymethods.adaptivestreaming }; the problem facing, if player set on autoplay="true", video not start on it's own. must open play list in player , select first video start playing. we have tried currentplaylistitem, has not changed anything. has dealt smoothstreaming wowza server? can shed light on strange behavior? when trying play video on windows phone 7 using smf (silverlight media framework) important know h.264/mpeg-4 video not play in emulator, , not play if device connected computer. video play if device connected via wifi or 3g. further more, sure have latest version of smf. reported binding currentplaylistitem not work on versions. quick solution problem, make binding in code , not in xaml.

ASMX returning JSON always inside an xml tag -

this question has answer here: how let asmx file output json 7 answers i have asmx services return json strings. use datacontractjsonserializer class , resulting json fine. when call these services consume in web app, response coming backencapsulated in xml tag. ways rid of xml , return json. example response : < ?xml version="1.0" encoding="utf-8" ?> < string xmlns="http://whatever.net/"> {"success":true,"data":{"roomlist":[{"createdat":"\/date(1291192978793-0800)\/","gametimeout":0,"matchpointingtype":0,"movetimeout":0,"name":"reterras numagona alantis","roomid":44,"sfid":null,"startingmatchpoints":0,"updateat":null,"userid":12},{"createdat":"\/date(12911

wpf - Binding Source in MediaTimeline -

i trying have mediatimeline bind uri so: <usercontrol.resources> <storyboard x:key="mystoryboard"> <mediatimeline storyboard.targetname="mymediaplayer" source="{binding mediasource}" repeatbehavior="forever" /> </storyboard> </usercontrol.resources> <usercontrol.triggers> <eventtrigger routedevent="frameworkelement.loaded"> <beginstoryboard storyboard="{staticresource mystoryboard}" /> </eventtrigger> </usercontrol.triggers> <grid> <mediaelement x:name="mymediaplayer" /> </grid> however, when this, says need "must specify uri." dispatcher exception. in viewmodel, have property like: public uri mediasource { { return _mediasource; } set { if (_oscilloscopesource != value) {

xml - adding some jquery script to Magento page -

this has been driving me insane. can't figure out how append jquery script head section of particular page in magento 1.4.2. i've added latest jquery library pages editing page.xml, , i've added no conflict thing. i know need add code custom layout update area page in question. nothing works, i've tried many pieces of code , none appear in head of page when later check source code. i posted same question on official mangeto forum 8 days later , no replies. forum horrible getting advice questions unanswered :(. idea how add head via custom layout update example? $(document).ready(function(){ $("a").click(function(event){ alert("thanks visiting!"); }); }); i've tried enclosing in script tags, in reference = head tag. nothing works. pulling hair out , i've googled every word phrase can think of no examples of how add scrip page's head in magento. please help. expanding on alan's excellent summary. if

json rpc - When implementing a JSONRPC 2.0 server, is it required to support both named, and positional arguments? -

according spec here: http://groups.google.com/group/json-rpc/web/json-rpc-2-0 more specifically, section: if present, parameters rpc call must provided structured value. either by-position through array or by-name through object. to me seems obvious both styles must supported, i've filed bug report , developer feels it's developers decide method support, , spec doesn't require both. i can't find official answer, other quoted above, other developer doesn't interpret same way do. so, general consensus? i agree fully, outlined in above documentation. word "must" in 4.2 sentence 1 requires "structured value". "structured value" later defined second sentence. ignore 1 of options change definition of "structured value" violation of json-rpc 2.0 specification if present, parameters rpc call must provided structured value. either by-position through array or by-name through object.

iphone - String matching objective-c -

i need match string in way: *mystring* * mean substring. method should use? can me, please? if it's iphone os 3.2 or later, use nsregularexpressionsearch. nsstring *regex = [nsstring stringwithformat:@".*%@.*", yoursearchstring]; nsrange range = [stringtosearch rangeofstring:regex options:nsregularexpressionsearch]; if (range.location != nsnotfound) { }

ruby on rails - Detecting if this is an iframe load or direct -

i looking show form if pulled on page within iframe. how do that? there server side solution? if using jquery... (installation instructions here: http://jquery.com/ ) $(document).ready(function(){ if( window == window.top) { $('form#myform').hide(); } }); which hides form id "myform" if window not topmost window.

internet explorer 8 - SimpleModal content isn't loading in IE8 when CSS overflow is set to "scroll" or "auto" -

i'm using simplemodal on website i'm developing. working fine across browsers until added "overflow: auto;" simplemodal css such: #simplemodal-container {height:90%; width:80%; color:#fff; overflow: auto;} i scrollbars when needed in ff, safari, , chrome fine, when @ in ie8 (haven't tried ie6 or ie7), if not of content of modal missing. appears spinning though it's waiting server, nothing happens. i've looked everywhere online answer issue, haven't been able find else who's having same issue. please let me know if need else me. thank in advance! pekka, taking look. sure wasn't javascript, because 1 of buttons, (resume) links simple html doc table , wasn't showing up. but think i've figured out! in css, there opacity settings, pretty copied on simplemodal website. 1 of settings ie workaround throwing errors whenever validated page. 5 minutes ago, thought, "hm. wonder if rid of opacity settings if

security - PHP Authentication -

currently authentication looks this: user enters username/password combination sent server, username , password salted , hashed (md5) , checked against database. if correct, , user has specified, month long cookie set. if user not specify set cookie, automatically signed out after 5 minutes of inactivity. my question if need to, , how to, make more secure. i'm pretty fluent in php, i'm not off in security. help, pointers, leads, , general assistance appreciated. thanks. :) just make sure stripping slashes username , password avoid sql injection mysql_escape_real_string , should security need.

Geocoding things from the database? -

i kind of new geocoding. want pull bunch of names of places db, , display them markers on page. , allow people choose different options force db query, place number of new markers on page. is possible? seems relatively simple functionality, since not @ json, giving me hard time. thanks, alex there lots of ways geocode , need give more information! for example, in offline environment, mappoint pretty solution (costs $200/300 license). can made work on webserver isn't worth effort. for web server, @ web service. these limited free use, or pay heavier (or commercial) use. question wide give specifics, @ web services provided bing maps, google maps, yahoo (yes they're still around), , openstreetmaps-based. bing maps , google maps they'll around long time - might cost, depending on application. openstreetmaps promises have widest coverage (including non nam/eur countries), doesn't have coverage of others, yet.

asp.net mvc - Where can i download .NET MVC 2.0 runtime? -

i looking mvc 2.0 runtime .net. have link? thanks you can download asp.net mvc 2 using microsoft web platform installer or download asp.net mvc 2 download center

How to set fixed number of elements of array in Ruby -

how set fixed number of elements of array in ruby. eg. a=["a","b","c","d"] setting array size 3 output a=["a","b","cd"] class array def squeeze(n, &p) p = proc.new {|xs| xs.join} unless p arr = self[0..n-2] arr << p.call(self[n-1..-1]) end end = ['a', 'b', 'c', 'd', 'e'] a.squeeze(3) # => ["a", "b", "cde"] it needs bounds checking idea. note "combining" function can given block argument: [1, 2, 3, 4].squeeze(3) {|xs| xs.inject {|acc,x| acc+x}} # => [1, 2, 7]

sql - Oracle Data Type for text file? -

i need create table in oracle store series of large text files. after looking @ oracle datatype's unclear type should use store files. the limits on text specific types varchar2 seem small (32k). other types don't seem right match text file (e.g. bfile). does have opinion on right type use? the difference between clob , blob/bfile clobs treated text. is, if pull clob database conversion necessary database character set client character set (eg removing accent ê). similarly, when clob created client, there can conversion client character set database character set. if both client , database character sets same, no conversion needed or performed. nclob clob except rather database character set, conversion uses nls nchar characterset. a blob/bfile not subject conversion rules. so use clob text, if there checksum/audit trail logic don't want slightest possibility of character set conversion, might opt blob/bfile. wouldn't consider long or long raw.

parsing - Parse IIS7 logs: Anything Google Analytics-like? -

i using google analytics give me "rich" data on referrers, clickstreams, etc. however, looks can rich data iis 7 (windows server 2008) logs ( w3c log format). looking online, see ton of tools logparser 2.2 , etc allow me parse iis logs, require ton of custom sql statements extract need. question : there tool (*.exe) gui or html output take input log file , output looks google analytics report? there's open source project called awstats might useful: http://awstats.sourceforge.net/ there's commercial packages such smarterstats have free edition restricted single site: http://www.smartertools.com/smarterstats/web-analytics-seo-software.aspx

math - operators precedence in C -

have trouble understanding expression: (x + y - 1) / y * y the operators precedence follows (as per understanding , k&r2, 2.12 table 2.1): 1) evaluate in parens: firstly (x+y), (x+y) -1 2) '*' operator has higher priority '/' it's supposed go first, bit appears (y * y) evaluated , result of (x+y-1) divided product (y*y). don't quite it. 3) ever heard rounding iw written in form: (x + y - 1) / y * y is correct? thank in advance! as mentioned earlier "*" , "/" have same precedence evaluated left right. totally disambiguating expression gives: ( ( ( (x + y) - 1) / y) * y)

website - Have you ever seen as i have checked session behaviour in gmail.com ? Please help? -

yesterday morning open gmail account in internet exlorer second tab. checked mail , closed tab (not browser). then @ time of evining again open second tab of browser , enetr gmail.com, automatically redirect me @ email account without asking login. i shocked , thought should remain browser open whole night , today open gmail in second tab , behave similar means without login screen redirect in gmail account. then closed tab , open browser session , enter gmail again surprised redirect me login page. @ same time open second tab of first browser , automatically redirect me @ mail account page. what councluded behaviour might gmail server keep browser id @ server whenever eneter gmail.com on second tab of first browser, automatically redirect me @ gmail account. don't know right or not? please clear me concept? happens session @ gmail server when closed browser tab? as per opinion should automatically logout me why doesn't happened? you ticked option "

How to set my .apk file to run on different screen resolution in android? -

i using "wvga800" app. try run on different resolution screens. it not scratching in resolution . read , implement issues form link. http://developer.android.com/guide/practices/screens_support.html still not result. please let me know if 1 hase perfect solution. main issue fixing hight & width of image, textsize etc. when these displayed screen of "wvga800". when test them on "hvga", "qvga" problem arise. want avoid "if else" conditions getting screen resolution @ runtime. if 1 hase solution this...let me know. in advance. wondring when there new devices new screen resolutions? see this , may helpful you.

service - Application running on emulator but not working properly on the Device -

i have developed simple alarmclock application , running on emulator, working when try run on device not working properly. can set alarm never starts. there information might helpful guys in order solve problem. have setup (emulator) of android 1.6, device has got android 2.2. not device totally rejecting app because able set alarm alarm never started. the application uses activities , service. main activity class uses pendingintent , alarmmanager set alarm , calls service class when alarm start. service class calls activity class show snooze , alarm off options, 'activity class' uses texttospeech api speak out greeting , alarm text. have double checked services , activities registered in androidmanifest.xml. hunch says service being blocked something. people , suggestions highly appreciated.

php - Error in my PDO execute function -

i have following query: select case when card_type='a' name else concat_ws(' ',firstname,lastname) end cname ,cardid,card_type,isdeck,userid_from,status,cards.gibid,message ,userid_to,description,tagline,gibs.preview_thumb ,case when userid_from=userid_to 'my card ' else 'other 'end owner cards left join gibs on gibs.gibid=cards.gibid left join users on users.userid=cards.userid_from userid_to=? , cards.deleted='n' , (case when card_type='a' name else concat_ws(' ',firstname,lastname) end) '%?%' order status,card_type desc,owner,cname,isdeck desc and array passed in execute function : array ( [0] => 1 [1] => rahul ) it giving me error .. warning: pdostatement::execute(): sqlstate[hy093]: invalid parameter number: number of bound variables not match number of tokens in /var/www/ryapi/db.php on

How to hide control in repeater in asp.net throught java script -

how hide control in repeater in asp.net throught java script i guess u want hide primary key. jusst put in repeater <asp:hiddenfield id="whatever" runat="server" text="any value"/> or <... style="display:none;" />

objective c - Command /usr/bin/codesign failed with exit code 1 -

possible duplicate: /usr/bin/codesign failed exit code 1 i getting error after sending 7-8 builds qa of company. thing tried : reinstalled appstore distribution provisioning profiles . restated xcode device. changed bundle identifier in info.plist. and error coming alternately , when trying clean build. alternately means first time error coming , next time gone , again coming , next time gone. can tell me hell happening, have nailed head hours. there advice on related question /usr/bin/codesign failed exit code 1 : ...you can right click error message in xcode , choose expand more details, including description of problem.

mercurial - Post-build commits: good or bad? -

is policy automate source control commits following successful builds? edit: i'm asking because want more frequent, incremental commits between versions make easier find point bug introduced rolling 2k+ new lines of code between v1.0 , v1.1. no. successful build not imply successful code change. never test code? if had sort of automated unit testing, understand question (although still recommend against - not consider code change tested until verified functionality yourself). automated commit after successful build - not if team mates, or if have access weapons.

set min length to fields in mysql -

hi new sql can me it. i want create field example code date_type int auto increment min size 9 number should 000000001,000000002...000000010.... use zerofill. here example: create table zerofill_test (f1 int(4) zerofill,f2 int(4)); insert zerofill_test values ( 1, 1 ), (10000, 10000); here f1 defined 'zerofill' of 'int' type , f2 simple int . when data selected select command shows desired result. select * zerofill_test; +-------+-------+ | h | m | +-------+-------+ | 0001 | 1 | | 10000 | 10000 | +-------+-------+ for purpose, size of int field should 9 i.e. `date_type int(9) zerofill'

iphone - Adding UITableView on top of UIView -

Image
i want add uitableview on top of uiview. here's image of want do. sample code link/tutorial appreciated. thanks uipopovercontroller + uitableviewcontroller need. ;)

asp.net - Using the username or Page.User.Identity.Name for select parameter -

i have login control inside loginview control , on loggedin template, there gridview , sqldatasource. what need use username filter gridview. error object reference not set instance of object.. tried adding .tostring page.user.identity.name take @ code below: <asp:loginview id="loginview1" runat="server"> <anonymoustemplate> <asp:login id="login1" runat="server" onloggedin="login1_loggedin"> </asp:login> </anonymoustemplate> <asp:sqldatasource id="sqldatasource1" runat="server" connectionstring="<%$ connectionstrings:applicationservices %>" providername="<%$ connectionstrings:applicationservices.providername %>" selectcommand="select distinct [username], [date], [timein], [timeout], [total] [attendance] order [date] username = @username "> <selectparameters> <asp:parameter name=&q

actionscript 3 - Compile all Opened FLA files in Flash IDE using JSFL -

is there jsfl script compile opened fla in flash ide? the jsfl found straightforward way, remember can publish flas in project file right project window (window -> other panels -> project in win/cs5), without having have each file open.

How to use MSMQ over http through the respective WCF binding? -

we have 1 way connection between agent , server via msmq. trying move msmq on http. now, msmq integrated iis on server side - made sure check respective option when installed msmq. puzzled next. mean, endpoint address has no indication msmq should on http. the relevant agent (which acts client) configuration is: <client> <endpoint name="wcfonewaydataportal" address="net.msmq://server/private/nc_queue" contract="shunra.common.contract.iwcfonewayportal" binding="netmsmqbinding" bindingconfiguration="msmq" /> </client> <bindings> <netmsmqbinding> <binding name="msmq" durable="true" useactivedirectory="false" exactlyonce="false" receiveerrorhandling="fault" maxreceivedmessagesize="2147483647"> <security mode="none"> <transport msmqauthe

how to parse json into php -

i have json data retrieved data base i.e $result=array(); $query="select * fish"; $result1 = mysql_query($query, $conn); while ($table = mysql_fetch_array($result1, mysql_assoc)){ $result[]=$table; } echo json_encode($result); , give me result [{"fish_id":"1","name":"first fish update","info":"this first fish update","image":"http:\/\/www.localhost\/cafe\/pics\/logout (1).gif"}] but page when call json data i.e $input = file_get_contents("http://localhost/fish/fish-json.php"); $json=json_decode($input); echo $json->fish_id; it give me error notice: trying property of non-object in /var/www/fish/json-to-php.php on line 13 call stack: 0.0005 318764 1. {main}() /var/www/fish/json-to-php.php:0 is array of object, so echo $json[0]->fish_id; to loop if (!is_array($json)) die('...'); foreach ($json $key=>$fish) { echo $fish->fish_id; }

php - Implement Open Id login -

i curious know how can add open id login website, 1 site (stackoverflow.com) using. my intention enable users login site, without registration. if have account @ popular sites google, yahoo or facebook, must able login website. can suggest me , free solution ? in stackoverflow here answer how use open id login system how implement openid in web application?

visual studio - How do I include an externally maintained directory as a VisualStudio 2008 C# Project Resource? -

i have directory contains externally maintained html files visual studio 2008 project. directory potentially contain arbitrary number of files build build. know how add directory , files project including them through solution explorer required output (content), in case want automatically include specified html directory, of subfolders, , of files without having set properties each time file added. i not want set "build action" , "copy output directory" properties each time each time there changes in files. constraint using both installation project (part of same solution) , clickonce install depending on deployment environment. seems should incredibly simple, have been unable find answer far. thanks help! one method might tweak .csproj file , add post build target copying. should close need: <itemgroup> <documentationfiles include="docsdirectory\**\*"/> </itemgroup> <target name="afterbuild"&g

Making a jar as a maven repository in web -

i have jar in hand (dont have source or project making jar) , dont have have maven repository. i publish on web acts repository. i tried maven artiefect. possible .jar file ? i want users access dependent jar. any 1 me how publish jar maven repository on website. if 1 of following scenarios true: you can install arbitrary programs on web host, or your web host has java installed , can run arbitrary java programs on it, or your web host runs servlet container tomcat , jetty , glassfish , or resin .. use arifactory simple configuration public repository , of artifacts. see arifactory user guide .

Views Carousel module in Drupal -

i have uploaded view carousel module in project. have created content type (named image). have added 1 field (imagefield) content type. after created view, there 1 image showing in slider. if 1 has information regarding this, please me. (all images showing in preview, not one) i haven't used module, here's 2 cents: the views carousel module deprecated in favor of jcarousel module. use newer module instead. jcarousel have better support (it has drupal 7 release) whereas views carousel dead-end.

iPhone Fast App Switching with Objective-C++ -

i'm using objective-c/c++ , have objective-c class wrapper c++ class, there special concerns need aware of in order use fast app switching? it understanding iphone auto-magically save state objective-c objects, i'm not sure if need special work enable support c++ objects. c++ class not have virtual functions. by fast app switching mean multitasking? there's nothing additional need - ios 4 handle task suspension , resume transparently, unless need perform background tasks, regardless of whether you're using objective c++ or plain objective c.

directory - Git repository within Git repository -

this question has answer here: how work git repository within repository? 4 answers i have main git repository , using sources out of git repository b in subdirectory of our main project. have b repository checked out within repository in used subdirectory. if else clones repository of course should our main repository , within automatically b repository. let me visualize directory structure: + main_repository - root directory of main repository + src - directory containing source + foreignrepo - should root directory of git repo + binaries + other this must known in remote repository, local copy doesn't me, because other people check out , must able compile stuff. you'll want read git submodules .

filter input - PHP: Wrapping built-in function (filter_input) and optional parameters -

so, know php can define optional parameters ( stackoverflow questions ). what i'm trying following: function myfunc($a, $b, $c, $type, $variable_name, $filter, $options) { $value = filter_input($type, $variable_name, $filter, $options); //do $a, $b, $c, , $value } since passing in parameters pertain built in function of filter_input know $filter , $options optional parameters, , make them optional assign them default value. but, i'm not sure default value should be. guess $filter should default filter_default , makes sense, can not find information $options should default to. default both $filter , $options null. optional filter_input() well, why assign them value when filter_input() you? if php ever update defaults function you'd still current, too. your function this: function myfunc($a, $b, $c, $type, $variable_name, $filter=null, $options=null) {...

validation - how to get selected index of html.dropdownlistfor -

i have dropdownlist: <%= html.dropdownlistfor(model => model.operatingsystem, model.operatingsystemdropdownbowvalues, new { style = "width:142px; margin-left: 10px; font-size: 11px;" })%> is possible index of item? need validate form, if first (default = "choose...") dropdownlist item selected(not user) not way save other form values. only if compare submitted value original list, or use javascript/jquery on submission. can add value of "choose..." option empty string? if can set value of "choose..." pick value return of dropdown element isnullorempty the [required] attribute should work being sumitted too. cheers

Connecting to MySQL using Java -

i have spring configured use hsql, use mysql. needs change? <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="viewresolver" class="org.springframework.web.servlet.view.internalresourceviewresolver" p:prefix="/web-inf/jsp/" p:suffix=".jsp" /> <bean id="mydatasource" class="org.apache.commons.dbcp.basicdatasource" destroy-method="close"> <property name="driverclassname" value="org.hsqldb.jdbcdriver"/> <property name="url" value="jdbc:hsqldb:hsql://localhost:9001"

jquery - each / click function not working -

edit: works, not sure why? $('button').each(function() { $(this).bind( "click", function() { alert($(this).val()); }); }); i'm not sure why isn't working... right now, i'm trying output alert button value, it's not working on page. don't console errors in firebug , can't see prevent working. my html looks this: <table id="addressbooktable"> <thead> <tr> <th>name</th> <th>action</th> </tr> </thead> <tbody> <tr> <td>7892870</td> <td><button id="button-20" class="custom-action" value="xy89" name="info">click</button></td> </tr> <tr> <td>9382098</td> <td><button id="button-21" class="custom-action" value="xy544"

javascript - Add/Removed tabbed data from a form using JQuery -

Image
i'm working on client portal @ moment , of people on forum , many hours of blood sweat , tears have got point pictured below. i need complete final step of form i'm not quite sure how go it. @ bottom there's tabbed interface , above there check boxes. want system user can check , uncheck boxes , tabs appear , disappear can choose days of week they're open. code needs add/remove details in tab scope of form , part i'm struggling work out. rest of form built using jquery i'm keen keep code consistent. what don't want person submit form @ bottom , accidentally submits days information haven't selected checkboxes. hope can help dan this code i'm using tab, tried jquery ui 1 didn't it $(document).ready(function(){ $( '.days:not(:first)' ).hide(); $('#info-nav li').click(function(e) { $('.days').hide(); $('#info-nav .current').removeclass("current"); $(this).addclass('current'

z index - DIVS over flash movies in Internet Explorer -

the age old question... why hell doesn't div positioned on flash object stay on top z-index. have found answer in past, it's been long, can't seem it. flash movie in div floating left: <div id="flash"> <object width="614" height="289"> <param name="movie" value="images/75.swf"> <param name="wmode" value="transparent"> <embed src="images/75.swf" width="614" height="289" wmode"transparent"> </embed> </object> </div> my css div needs on top is: .menu ul li:hover ul li a:hover { background:#5a3f2d; color:#fff; z-index: 9999; i cannot show above flash movie in ie6 or ie8. know old school i'm frustrated! nav div need have absolute position? why doesn't work? example here. hover on first link on right: "customer service" thanks :) hope , please take on. http://manisheriar.com/blog/

iis 7 - .NET Framework 1.1 on IIS 7 -

Image
i have inherited .net framework 1.1 web site must host iis 7 on windows server 2008. i'm having trouble. 1. installation i installed .net framework 1.1 following these instructions . the installation automatically created new application pool "asp.net 1.1". use that. 2. trouble when launch web site see web.config runtime errors: the tag contains invalid value 'culture' attribute. i fix 1 , see: child nodes not allowed. i don't want keep playing whack-a-mole game. something must wrong. 3. sure .net 1.1? i examine automatically created application pool. see it's 1.1. advanced settings... basic settings... this doesn't seem right. while 1.1 set, it's not option in advanced drop down selectors. and why in basic box "v1.1" , not ".net framework v1.1.4322"? more consistent. 4. cannot create other .net 1.1 app pools i cannot select .net framework 1.1 other application pools. it's