Posts

Showing posts from July, 2012

node.js - Unable to install bower on Openshift -

i unable install bower on openshift. keep on getting errors like remote: npm err! error: enoent, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/array/intersection.js'[k remote: npm err! if need help, may report log at:[k remote: npm err! <http://github.com/isaacs/npm/issues>[k remote: npm err! or email to:[k remote: npm err! <npm-@googlegroups.com>[k you can see full deployment logs https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [from travis here]. i tried several approaches: 1) , without .bowerrc file case:1 { "directory": "~/app-root/runtime/repo/public/libs" "storage": { "cache": "~/app-root/runtime/repo/node_modules/bower/cache", "completion": "~/app-root/runtime/repo/node_modules/bower/completion", "git": "~/app-root/runtime/repo/node_modules/...

configuration - Raspberry Pi: able to access through own network but not internet -

i'm learning how set web server using raspberry pi diy project. i followed instructions on guides around internet (maybe thats why screwed because combined instructions different guides). port forwarding , uploading of files done able access website through network (lan , wireless) not able access threw internet. solutions? first of all, before check else, forwarding correct ports correct i.p. address? after check that, there firewalls in place on raspberry pi might close down connections form outside network. another thing might want check if isp (internet service provider) allows portforwarding on ports wish use (typically 80 , or 443). if not case, may want try forward port , connect outside network through port (you add :portnumber after url or i.p. address in browser). if else fails, install web server (apache) sudo apt-get install apache2 -y on vanilla raspbian image , follow this tutorial explains how toset port forwarding (in greater detail have done). ...

excel 2010 - Databar Appears only when cell edit made -

Image
i have exported data datagridview excelsheet using epplus library for = 0 analysis.dgv1.columns.count - 1 worksheet1.cells(1, + 1).value = analysis.dgv1.columns(i).headertext next = 0 analysis.dgv1.rows.count - 1 j = 0 analysis.dgv1.columns.count - 1 worksheet1.cells(i + 2, j + 1).value = analysis.dgv1.rows.item(i).cells(j).value next next using range = worksheet1.cells(2, 4, analysis.dgv1.rowcount, 5) range.style.numberformat.format = "#,##0" end using column 4,5 numeric column have added databar excelsheet using using range = worksheet1.cells(2, 4, analysis.dgv1.rowcount, 5) range.conditionalformatting.adddatabar(system.drawing.color.lightgreen) end using in exported excelsheet data shows fine but, databars appears when cell edit made here screenshot of image 84,83 cell entered in edit mode other un touched it's because databar needs numeric value , here entering number string try converting number before insert...

jsf - EnvironmentCapable Not available Spring 3.2.3 -

am trying integrate spring 3.2.3 jsf 2.2.1 , getting error caused by: java.lang.noclassdeffounderror: org/springframework/core/env/environmentcapable class available in classpath (spring-core-3.2.3.release.jar) not sure why error occurs. it worked fine when removed project server, clean/build , restarted again. thanks.

java - Meaning of the hs_gc profiler counters in JMH -

i'm using jmh benchmarking tool hs_gc hotspot profiler. the issue i'm having unsure output counter values mean , cannot find reference on net. would able point me in direction of specification or explain these values? i have pasted example output below: hs(gc) | difference: { sun.gc.collector.0.invocations=16, sun.gc.collector.0.lastentrytime=37106821, sun.gc.collector.0.lastexittime=37109336, sun.gc.collector.0.time=1528884, sun.gc.collector.1.invocations=6, sun.gc.collector.1.lastentrytime=34419368, sun.gc.collector.1.lastexittime=35532892, sun.gc.collector.1.time=6721387, sun.gc.generation.0.space.0.used=872712984, sun.gc.generation.1.space.0.used=5721334504, sun.gc.generation.2.space.0.used=4848, sun.gc.policy.avgbasefootprint=5312, sun.gc.policy.avgmajorintervaltime=-667, sun.gc.policy.avgmajorpausetime=-41, sun.gc.policy.avgminorintervaltime=-557, sun.gc.policy.avgminorpausetime=1, sun.gc.policy.avgoldlive=88064, sun.gc.policy.avgpromotedavg=421184, sun...

security - Is XSS dangerous even if the cookie doesn't store user credentials? -

whenever talks dangers of xss, mention 'bad guys' can access user credentials. if store session id on cookie, , authenticate user based on session id, there other ways xss can used access user credentials? yes. xss means foreign or malicious script running on page. there bunch of ways dangerous. session hijacking even if cookie doesn't store user credentials (and shouldn't). stores enough information server consider bearer of cookie particular user (http stateless use cookies/sessions remember users). so if steals session id can use impersonate , server might none wiser. safeguarding ip in original question asked level of security: verifying ip address tied session. yes, cuts down attack avenue. yes, ip addresses can faked. you're no longer lowest hanging fruit attackers. @ same time security , convenience opposites legitimate users might frustrated when ip address changes no longer signed in. other attacks stealing cookie/sessio...

c# - Why onTextChanged not working in ASP.net -

this question has answer here: why asp.net ontextchanged not working 2 answers i have following textbox in asp.net page: <asp:textbox ontextchanged="maxchar" id="txtname" width="95%" runat="server"></asp:textbox> the following in code-behind: protected void maxchar(object sender, eventargs e) { if (txtname.text.length > 25) { lblisvalid.text = "only 25 characters allowed"; } } when enter text in textbox , exceed 25 character nothing displayed in label. how can fix it? in case, max lenght, should use property of asp:textbox called maxlength="25". but, if want send message user, recomend use jquery, it's easy: $('#txtname').keydown(function(){ if($(this).length >= 25){ //you alert }; });

c++ - Return codes for int main - is there a cap? -

this question has answer here: why cant' return bigger values main function? 3 answers i have been playing around return codes today created loop in bash test out: for rc in {1..300} echo "int main(void) { return $rc; }" > test.cpp g++ test.cpp -o test ./test echo $? done however after reaching 255 seems begin 0 again. why that? eg: 252 253 254 255 0 1 because return codes in posix-compliant systems limited range [0-255]. with regard bash, here handy reference on exit statuses.

javascript - Highcharts area chart hide graphs with one data point -

i have product our customers can choose date range. 1 of our tools, make them area chart highcharts of data. i've noticed when area chart has 1 data point on x axis, no graph shown. here's example in jsfiddle: http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/area-basic/ code below posterity: $(function () { $('#container').highcharts({ chart: { type: 'area' }, title: { text: 'us , ussr nuclear stockpiles' }, subtitle: { text: 'source: <a href="http://thebulletin.metapress.com/content/c4120650912x74k7/fulltext.pdf">'+ 'thebulletin.metapress.com</a>' }, xaxis: { allowdecimals: false, labels: { formatter: function() { return this.value; // clean, unformatted number year ...

Rspec, Rails - unable to account for controller variable in testing -

i new testing. don't seem able account variable in controller in rspec tests. how can account needed variable in tests , make these tests pass? current test: describe "post create action" let(:trip) { create(:trip)} let(:trip_date) { create(:trip_date) } let(:buyer) { create(:buyer) } let(:company) { create(:company) } let(:order_item) { attributes_for(:order_item, trip_date_id: trip_date.id, buyer_id: buyer.id, company_id: company.id) } let(:bad_order_item) { attributes_for(:bad_order_item, trip_date_id: trip_date.id, buyer_id: buyer.id, company_id: company.id) } context "given valid order item attributes" "creates new order item" expect{ post :create, order_item: order_item, trip_id: trip.id }.to change(orderitem, :count).by(1) end end end this error message: orderitemscontroller post create valid attributes creates new order ...

Properly setting up Microdata for "stock image product" by Schema.org standard? -

i'm setting product page sells stock images, , i'd represent via schema.org (using microdata), product, creativework, person, etc., being attributed. i'm having issue not seem possible mix "product" "creativework" although in case same. i suppose question this: how executed necessary attributes included without issues? here have far: <div itemscope itemtype="http://schema.org/creativework"> <h1 itemprop="headline">some image me!</h1> <div itemscope itemtype="http://www.schema.org/imageobject"> <a href="http://www.example.com/mypic.png"><img itemprop="image thumbnail contenturl" src="http://www.example.com/mypic.png" /></a> <span itemprop="contentsize">20mb</span> <span itemprop="width">2000</span> <span itemprop="height...

python - Invalid RegEx Entered by User in Django Form Causes 500 Server Error -

i have simple django search form set in web application, users can search particular words in arabic corpus. users can search 1 of 3 way: 'exact' (the word it's typed), 'stem' (which brings inflected forms of lemma entered), , 'regex' (where can more complex searches regular expression). the problem i'm having is, if user submits invalid regex, instead of giving them validation error or empty results, triggers 500 server error. imagine confusing. below traceback such , error, caused searching regex unbalanced parenthesis: ha((.*(?!al)) is there anyway catch kind of error, or make more user-friendly? (i've included code form below.) thank you. class concordanceform(forms.form): searchterm = forms.charfield(max_length=100, required=true) search_type = forms.choicefield(widget=radioselect(), choices= ([('string', 'exact'), ('lemma', 'stem'), ('regex', 'regex') ]), ...

php - Selected radio button make field true or false -

i have following code: <?php $radioswitch = of_get_option('radio_switch'); if ($radioswitch == "true") { ?> <!-- radio switch --> <div class="row switches clearfix"> <input type="radio" name="switch" id="switch1" value="<?php echo of_get_option('switch1'); ?>" /><label for="switch1" class="field"><?php echo of_get_option('switch1'); ?></label> <input type="radio" name="switch" id="switch2" value="<?php echo of_get_option('switch2'); ?>" /><label for="switch2" class="field"><?php echo of_get_option('switch2'); ?></label> ...

javascript - Php script loading with some html -

i have created html page (index.html) script loading of php page (page.php) : var dslscript = document.createelement("script"); dslscript.src = surl; dslscript.type = "text/javascript"; document.body.appendchild(dslscript); document.body.removechild(dslscript); my problem here php page contains html , javascript. html of page.php seems pose problem when index.html page tries load php page: uncaught syntaxerror: unexpected token < is there header can place on php page allow index.html process php code of page.php ? or should convert html javascript/dom, may take time. your script trying put html inside of tag. cause parse error. browser try evaluate inside tag javascript. so, yes, should convert inline html string fragments dynamically appended or inserted dom.

Not seeing latest version when updating Node.js via installer (MSI) Windows 7 -

i'm trying update node on windows 7 box i'm not seeing latest version after re-install/update node. i'm going out http://nodejs.org/download/ , getting latest windows installer, v0.10.28 . run installer defaults installing on local hard drive, including npm, cool because wanted upgrade well. install runs/finishes no apparent problem, when a: node --version i'm still seeing "old" version, v0.10.15 , not latest supposedly installed, v0.10.28. npm version still reports "old" version well. i've tried rebooting well. how heck 1 update node/npm? i had similar problem on macos , reason had nvm installed. running commands found on websites: sudo npm cache clean -f sudo npm install -g n sudo n stable didn't work, node -v still displayed old version. did install node nvm: nvm install v0.12.6 this build node scratch on machine, , node -v display correct version. think have still used previous commands using n , nvm...

javascript - Documents not being stored in full in MongoDB -

i working on project client. project consists of multiple pages of form inputs used online application. using nodejs , mongodb server communication , storage. online applications submitted stored in mongodb individual documents. the problem having around 8% of these applications not being stored completely. there 162 inputs in application. reason 8% of applications storing initial input value email address. rest of inputs blank. if there problem in javascript, not affect of entries , not 8% or so? my initial thinking user error , applicants aren't getting passed initial page, client has informed me receiving mailed paperwork accessible print if applicant completes online application in full. leads me believe mongodb culprit. don't know how can prove this. insufficient processing power on server cause kind of intermittent issue? using amazon aws m1 small instance project, inexpensive , less powerful, there on 1,200 documents in database on 3 month span, server...

sql - MySQL Inner join with where on multiple rows -

i need sql solution following: lets have 1 table named "trips" [ id ][ name ][ duration] [ 1 ][ trip1 ][ 12 ] [ 2 ][ trip2 ][ 16 ] [ 3 ][ trip3 ][ 5 ] and table countries each trip visits: locations [ tripid ][ country ] [ 1 ][ ] <-- [ 1 ][ pa ] <-- [ 1 ][ ru ] [ 2 ][ ] <-- [ 2 ][ pa ] <-- [ 3 ][ pa ] [ 3 ][ ru ] now want trips visitis "us" , "pa". result 1 , 2 becouse both visit , pa. i thought use inner join takes 1 row in locations table (afaik) can me? [edit] i have working ugly way: select * ,group_concat(distinct(locations.country) separator ',') countrycodes trips left join locations on trips.id = locations.tripid group trips.id having countrycodes '%pa%' , countrycodes '%us%'; but think using "like" ugly solution select *, count(distinct tripid) cnt trips left joi...

Django Field Regex Validation -

i trying create model store hashtag. the validator doesn't seem working, making field accept inputs, , can't find solution. here model: class hashtags(models.model): hashtag_validator = regexvalidator(r'^[#](\w+)$', "hashtag doesn't comply.") hashtag_id = models.autofield(primary_key=true) hashtag_text = models.charfield(max_length=100, validators=[hashtag_validator], unique=true) def get_id(self): return self.hashtag_id def get_text(self): return self.hashtag_text you can alter below given code see working hashtag_validator = charfield( max_length=50, required=true, #if want field mandatory validators=[ regexvalidator( regex='^[#](\w+)$', message='hashtag doesnt comply', ), ] ) hope helps!! if causing problem can try writing own validator from django.core.exceptions import validationerror import r...

Convert query from MySQL to SQL Server -

i trying convert below mysql query sql server. select @a:= @a + 1 serial_number, a.id, a.file_assign_count usermaster a, workgroup_master b, ( select @a: = 0 ) c a.wgroup = b.id , file_assign_count > 0 i understand := operator in mysql assigns value variable & returns value immediately. how can simulate behavior in sql server? sql server 2005 , later support standard row_number() function, can way: select row_number() on (order xxxxx) serial_number, a.id, a.file_assign_count usermaster join workgroup_master b on a.wgroup = b.id file_assign_count > 0 re comments: edited above show over clause. row-numbering has meaning if define sort order. original query didn't this, means it's rdbms order rows returned in. but when using row_number() must specific. put xxxxx , put column or expression define sort order. see explanation , examples in the documentation . the subquery setting @a:=0 initializing varia...

AngularJS assigning scope variable from scope -

in angularjs, when trying assign scope variable value of scope variable, value of derived variable empty. in example, i'd have scope reference car, , specific car part (which may change later in application). example: $scope.car = car.get(); //async http service returns json car object $scope.selectedcarpart = $scope.car.brakes; html: <div>{{car.engine}} - {{selectedcarpart}}</div> output: v8 - why selectedcarpart empty? i assume get call async, when assign selectedcarpart , $scope.car null , doesn't have yet brakes . you have wait end of get call , assign value of resulting json car object in success callback of http service.

javascript - npm install couldnt install angularjs libraries -

i have installed mean.io , ran sudo npm install. following commands in sequence sudo npm install -g meanio mean init yournewapp cd yournewapp sudo npm install -g bower sudo npm install it supposed download , install angularjs libraries public/system/lib. after doing above steps public /system/lib not created due when start application error events.js:72 throw er; // unhandled 'error' event ^ error: enoent, open '/home/santhosh/dev/scaleqa/mean_tut/old mean/temp/myapp/public/system/lib/bootstrap/dist/css/bootstrap.css' [nodemon] app crashed - waiting file changes before starting... is npm/angularjs server being down. have faced problem earlier got fixed on 2nd try , didn't bother more research. became big issue when try pull repo cloud , start application. public/system/lib added in .gitignore default , expected created during npm install. i following warnings sudo npm install npm warn package.json mean-connect-mongo@0.4.3 no ...

javascript - SetTimeout multithreading in Titanium -

so i'm making titanium application , i've found on android single thread being overloaded, causing large lock-ups. boss insisting using settimeout can used mimic multithreading , reduce lag. have read not case javascript cannot multithread, nor "fake it". please explain in clear terms whether or not can utilize in settimeout in manner (i need able bring boss)

google app engine - AppEngine Modules to subdomain -

i know how can point 1 of module in appengine subdomain. example: module-one.myapp.appspot.com -> mydomain.com module-two.myapp.appspot.com -> two.mydomain.com solution: how @svpino have set wildcard. then have have on dispatch.yaml: url: "two.mydomain.com/*" and have create custom domain name in settings of app engine. you have set wildcard subdomain: example: *.app.example.com. can read more how in following link: https://developers.google.com/appengine/docs/domain#more_about_wildcard_subdomain_mapping if set wildcard subdomain mapping custom domain, application serves requests subdomain matches. if user browses domain matches application version name or backend name, application serves version. if user browses domain matches backend name, application serves backend. example, suppose set wildcard subdomain *.wild.example.com. application has 2 versions, default version , 1 named beta. application has backend server ...

Setting UTF-8 locale for python in Ubuntu 12.04 -

on ubuntu 12.04 vm (set using vagrant , hashicorp/precise64 box), locale says have utf-8 language, python getting latin-1 environment. here's i'm seeing: vagrant@vagrant:~$ locale lang=en_us.utf-8 language= lc_ctype="en_us" lc_numeric="en_us" lc_time="en_us" ...

compiler construction - Compiling a for statement from BASIC to C++ -

i'm writing compiler migrate legacy vb6 program c++. need translate for statement in vb6 language c++ for statement: for var = start end step s ... next var the naive translation not work since s might negative: for (var = start; var <= end; var += s) i've came translation ternary if in condition ugly: for (var = start; (s > 0) ? (var <= end) : (var >= end); var += s) it's generated code. you'll ever looking @ when debugging code generator. it's totally irrelevant if it's ugly. matters if correct , simpler generate, better. update: however, if it's migration, might indeed make sense try make code readable. i'd either: resolve operator use in translator if possible, since step constant. hide logic in auxiliary definition , use range-based for: for(auto var : basic_range(start, end, s)) unfortunately boost::irange did not make c++11 , defined using half-open range usual c++, i.e. end not included whil...

jquery - Javascript One Page Fixed Header Responsive Slideup and Down -

i figured out how make header disappears upon click when viewing within mobile version disappears when you're not in mobile version. how make if it's not in mobile version, not disappear upon click? html <header> <div class="head_container"> <a href="#" class="logo"><h1>hello</h1></a> <nav> <a href="#" id="top_menu">hello</a> <ul> <li><a href="#homepage">homepage</a></li> <li><a href="#contact">contact</a></li> <li><a href="#about">about</a></li> </ul> </nav> </div> <div class="clear"></div> </header> css desktop nav { margin: 0 auto; float: right; font: 14px arial, sans-serif; ...

ggplot2 - R ggplot - how do you specify the order of the y axis -

this question has answer here: change order of discrete x scale 5 answers i trying create plot in r, simple has been bugging me days , can not work. when make plot r orders y axis alphabetical order, how specify order want. using example below: x = c("high ind.", "high sp.", "mid ind.", "mid sp.", "low ind.", "low sp.") y = c(4.6, 2.3, 5.5, 2.2, 12.6, 3) sd = c(3.2, 1.2, 4.4, 1.5, 5.9, 1.5) qplot(x,y, xlab="water level", ylab="mean number of ind. , sp. standard deviations") + geom_errorbar(aes(x=x, ymin=y-sd, ymax=y+sd, width=0.2), color="blue") i order on y axis this: high, mid, low. r automatically puts in alphabetical order. have tried many ways fix aimed @ large more complex datasets, , not work such simple set of data. there must simple way fix this.. ...

r - Why doesn't predict like the dimensions of my newdata? -

i want perform multiple regression in r , make predictions based on trained model. below example code using: price = c(10,18,18,11,17) predictors = cbind(c(5,6,3,4,5),c(2,1,8,5,6)) predict(lm(price ~ predictors), data.frame(predictors=matrix(c(3,5),nrow=1))) so, based on 2-variate regression model trained 5 samples, want make prediction test data point first variate 3 , second variate 5. warning above code saying 'newdata' had 1 rows variable(s) found have 5 rows . how can correct above code? below code works fine give variables separately model formula. since have hundreds of variates, have give them in matrix since unfeasible append hundreds of columns using + sign. price = c(10,18,18,11,17) predictor1 = c(5,6,3,4,5) predictor2 = c(2,1,8,5,6) predict(lm(price ~ predictor1 + predictor2), data.frame(predictor1=3,predictor2=5)) thanks in advance! the easiest way past issue of matching variable names matrix of covariates newdata data.frame column names put ...

c# - How to find a button by name -

so, have 2 buttons in xaml: <button x:name="but1" /> <button click="button_click" tag="but1" /> and want fiind first button when second button pressed , add listbox this: private void button_click(object sender, routedeventargs e) { //this how imagine string buttonname = (sender button).tag.tostring(); button findedbutton = find(buttonname); listbox1.items.add(findedbutton); } you can try this. layout root overall layout inside layout want find item name return object , have check if button found looking for. object item = layoutroot.findname(buttonname); if(item button) { button btn=(button)item; }

flash - Alternative to Java Applets for applications that require hardware or local file access -

are there alternatives java applets (or web starts) , flash (or silverlight) browser application allows file access / hardware access client machine? java , flash/silverlight both have deficiencies makes them unfeasible solutions projects. are there new technologies purpose, not yet popular might in near future? no there's no technology right or in future allowed web browser. such technology allow hackers take control of personal computers without passing check.

php - Google Closure, Response Always Empty -

Image
i'm trying basic example of how use google closure minify js. can't seem work @ all. i'm trying follow these examples: https://developers.google.com/closure/compiler/docs/gettingstarted_api http://closure-compiler.appspot.com/home when working on api's and/or ajax code, first thing try variables , values setup using advanced rest client applications - chrome extension. whenever send data, though, empty response (image below). trying insert same code php code, no matter send in $postdata variable, empty (null) response. php code: $postdata = http_build_query( [ 'output_info' => 'compiled_code', 'output_format' => 'text', 'compilation_level' => 'simple_optimizations', 'js_code' => urlencode("function hello(name) { // greets user alert('hello, ' + name); } hello('new user');") ] ); $ret = $this-...

php - MDB2 Failure to Connect to MySQL on OSX Mavericks -

configuration: mac os x 10.9.3 php 5.4.24 (default) mysql 5.6.17 pear list: mdb2 2.4.1 stable mdb2_driver_mysql 1.4.1 stable pear 1.9.4 stable i have database in place on localhost , it's accessible particular account , password: % mysql -u stacks -p password mysql> use redseaexp_radtags; database changed mysql> ^d but: % php -a php > require_once("/usr/local/share/pear/mdb2.php"); php > $dsn = 'mysql://stacks:password@localhost/redseaexp_radtags'; php > $options = array(); php > $dbh = mdb2::connect($dsn, $options); php > echo($dbh->getmessage() . "\n"); mdb2 error: connect failed php > echo($dbh->getuserinfo() . "\n"); connect: [error message: no such file or directory] [native code: 2002] [native message: no such file or directory] ** mysql(mysql)://stacks:xxx@localhost/redseaexp_radtags php > ^d i don't see issues code, missing something; same ...

Visual Studio 2013 Ultimate "Error Writing the Project File" C# -

i'm trying make c# windows forms application, whenever try, error: "error writing project file." i error when try making basic application or other c# application. tried searching internet solution, nothing worked. tried reinstalling nuget , msxml6. neither worked. edit i able make c++ projects, not c# , basic

CocoaPods podspec with per architecture flags -

quick version: have library of code i'm creating cocoapods spec file for. needs different compiler flags based on architecture. possible? explanatory background: 1 of library's files contains arm neon intrinsics code. armv7 & armv7s flags are: s.compiler_flags = '-mfloat-abi=softfp', '-mfpu=neon', '-mcpu=cortex-a9' the last flag causes (totally reasonable) compile error on arm64. xcode supports per-architecture flags in build settings area, has been building fine, until when podspec wrapper required. is there way configure cocoapods spec per-architecture flags? one solution, found via can set architecture specific build settings in .xcconfig file in xcode 4.3? , use xcconfig: # common flags s.compiler_flags = '-mfloat-abi=softfp', '-mfpu=neon' # per-arch flags s.xcconfig = { 'other_cflags[arch=armv7]' => '$(inherited) -mcpu=cortex-a9' , 'other_cflags[arch=armv7s]'...

sql - Ascending and Decending ORDER BY clauses in a single query -

i working on these problems class i"m taking, 1 has me stumped. here problem: --using author table, write query list information authors --whose first name ends “a”. put results in descending order of last name, --and ascending order first name. should done using single query. here i've come far: select * author where(fname '%a') order lname desc, fname asc; however in result information ordered last name descending. first name ascending doesn't seem work. any thoughts on i'm missing? using oracle express 10g, if matters. thanks. there nothing wrong query. have pay attention data :-) here how interpret data output: --------------+-------------- zzz | john zza | adam zaa | bob ccc | jack ccc | john cca | mike so, ordering works instruct oracle - lname desc, fname acs, need realize fname asc comes in picture once lname desc processed. in other words: zzz comes before zza ...

visual studio - Trying to convert Delphi interface definition to C++ for VS 2008 -

i need convert interface defined in delpi c++. made small demo project contains of stuff shown below. first delphi function person claims working on this thread : function canfilebedeletedtorecyclebin(const afilename: unicodestring): boolean; var recyclebinmanager: irecyclebinmanager; begin olecheck(cocreateinstance(clsid_recyclebinmanager, nil, clsctx_inproc_server or clsctx_local_server, irecyclebinmanager, recyclebinmanager)); try result := recyclebinmanager.willrecycle(pwidechar(afilename)) = s_ok; recyclebinmanager := nil; end; end; the rest of delphi interface definitions are here . so came following c++ code unfortunately crashes. (again, let me repeat person wrote delphi version claims works fine him.) hresult hr; coinitializeex(null, coinit_disable_ole1dde | coinit_apartmentthreaded); // {4a04656d-52aa-49de-8a09-cb178760e748} const clsid clsid_recyclebinmanager = {0x4a04656d, 0x52aa, 0x49de, {0x8a, 0x09, 0xcb, 0x17, 0x87, 0x60, 0xe7, 0x48}};...

asp.net - Web Service: Decimal Not Being Passed to Database Correctly -

i have web service , can see data member of 0.03 being passed web service database showing 0.000. column in database defined decimal(18,4). data member of business class defined decimal. using visual studio 2010, sql server 2008 , .net 4.0. why isn't 0.03 appearing in database column rather 0.000? int createapp; shortsaleinvestorreviewserviceclient _service = new shortsaleinvestorreviewserviceclient(); decimal currentinterestrate = txtcurrentinterestrate.text != string.empty ? decimal.parse(txtcurrentinterestrate.text) : new decimal(); createapp = _service.updateshortsaleapplication(currentinterestrate); the web service through linq calls stored procedure update table. alter procedure [dbo].[updateshortsaleapplication] @ishortsaleapplicationid int, @icurrentinterestrate decimal, update [shortsaleapplications] set [currentinterestrate] = @icurrentinterestrate shortsaleapplicationid = @ishortsaleapplicationid when stepping thr...