Posts

Showing posts from March, 2010

node.js - Multiple polling request on updating socket.io to 1.0 version (HTTP Error 400) -

node.js - Multiple polling request on updating socket.io to 1.0 version (HTTP Error 400) - i using node.js along socket.io, working till now. after updating socket.io latest version of 1.0 next issue has come notice. 1] continuously getting error "http error 400" in new relic, unable trace why error come please help me.... 2] getting multiple polling requests of type get, response comes null. when seek open url of request, next response returned: output {"code":3,"message":"bad request"} following requests see in firebug console: get http://yourdomain.com:8080/socket.io/?eio=3&transport=polling&t=1412592572238-0 200 ok 463ms http://yourdomain.com:8080/socket.io/?eio=3&transport=polling&t=1412592572811-1&sid=hcvdc05luqybnptmaccy 200 ok 241ms http://yourdomain.com:8080/socket.io/?eio=3&transport=polling&t=1412592573093-3&sid=hcvdc05luqybn

c++ - Why is using the move constructor in a return statement legal? -

c++ - Why is using the move constructor in a return statement legal? - consider following: #include <iostream> #define trace(name) std::cout << #name << " (" << << "), = " << << std::endl class c { c(c const&); c& operator=(c const&); public: int i; c() : i(42) { trace(ctor); } c(c&& other) : i(other.i) { trace(move); other.i = 0; } c& operator=(c&& other) { trace(asgn); other.i = 0; homecoming *this; } ~c() { trace(dtor); } }; c func1(bool c) { c local; if (c) homecoming local; else homecoming c(); } int main() { c local(func1(true)); homecoming 0; } both msc , g++ allow return local , , utilize move constructor (as shown output) when doing so. while makes lot of sense me, , think should case, can't find text in standard authorizes it. far can see, argument move constructor must either prvalue (which isn

javascript - THREE.JS Creating an object dynamically -

javascript - THREE.JS Creating an object dynamically - i have json config like: { shape:[ 'spheregeometry', [7, 16, 16] ] } and seek load model like: new three[shape[0]].apply( this, shape[1] ) as can see "new" , "apply" not alternative here. know trick or tip how can solve problem here? thank in advance. the solution based on use of .apply() 'new' operator. possible? json config { shape: 'spheregeometry', properties: [ null, 7, 16, 16 ] } and creating new object: new (function.prototype.bind.apply( three[object.shape], object.properties )) javascript three.js

Is there a way to indent code segment in vim? -

Is there a way to indent code segment in vim? - in basic editors in windows can select few lines of code , indent them , forth, there simple way in vim? in normal/visual mode can utilize > , < adjust indentation in insert mode, can press ctrl-t , ctrl-d adjust indentation in command mode, can still utilize :> , :< adjust indentation besides, can seek = magic auto format text. :h = :h > :h :> if want select lines (visual mode), indent them , forth , remain in visual mode, can have these 2 lines in vimrc (i have in mine): "reselect visual block after indent/outdent vnoremap < <gv vnoremap > >gv now can visual select, press >>>> <<<< play indentations. p.s in basic editors in windows can.... vim not basic editor, don't bring old habit advanced editor. :-) vim

java - List iteration - Generic logic -

java - List iteration - Generic logic - i have list of beans ( list<aclass> ), creating 2 sub list based logic involves checking field bean class, action. if bean.getaction.equals("true") - add together new sublist - list<aclass> lista else - add together new sublist - list<aclass> listb i have created method , works fine. now have similar task other bean class have list<bclass> has action field , getaction method. want create generic method cater both these beans (and other similar beans well). how can create such method? use list<? extends parentclass> parentclass parent of aclass , bclass java generics

css - Radio Input with hover -

css - Radio Input with hover - i trying add together hover radio boxes. !important not work. there way radio input fields hovering? can see total illustration on jsfiddle. tried on line 39. if select 5th radio box, , hover on first one, other should turn gray , hovered orange. /* filled rating */ .rating-fill{ width:0; height:100%; background:url('data:image/svg+xml;base64,pd94bwwgdmvyc2lvbj0ims4wiiblbmnvzgluzz0idxrmltgipz4ncjwhls0gr2vuzxjhdg9yoibbzg9izsbjbgx1c3ryyxrvciaxny4xljasifnwrybfehbvcnqgugx1zy1jbiauifnwrybwzxjzaw9uoia2ljawiej1awxkidapicatlt4ncjwhre9dvflqrsbzdmcgufvcteldicitly9xm0mvl0rurcbtvkcgms4xly9ftiigimh0dha6ly93d3cudzmub3jnl0dyyxboawnzl1nwry8xljevrfrel3n2zzexlmr0zci+dqo8c3znihzlcnnpb249ijeumsigawq9ikvizw5lxzeiihhtbg5zpsjodhrwoi8vd3d3lnczlm9yzy8ymdawl3n2zyigeg1sbnm6egxpbms9imh0dha6ly93d3cudzmub3jnlze5otkvegxpbmsiihg9ijbweciget0imhb4ig0kcsb2awv3qm94psiwidagmjagmjaiigvuywjszs1iywnrz3jvdw5kpsjuzxcgmcawidiwidiwiib4bww6c3bhy2u9inbyzxnlcnzlij4ncjxwb2

android - Listview TextWatcher filter sorting wrong result -

android - Listview TextWatcher filter sorting wrong result - heyy guys hav list showing list of cuisine.now sort list items hav defined edittext user type within edittext list items filtered textwatcher.but problem listview gives me wrong items.as type first character gives me 1st 6 items of list is,when type 2nd char gives me 1st item of list if character not contained in items strings.whats mistake? public class test extends activity { edittext editsearch; linearlayout layout; string temp; private listview listview; private displaymetrics metrics; string[] values = new string[] { "american","algerian ", "andhra", "anhui", "arabian", "asian", "assamese", "awadhi", "bakery", "beijing", "bengali", "beverages" , "bhojpuri", "biryani", "cafe", "cameroonian", "canadian", "canto

svn - how to write post-commit hook to automatically synchronize two repositories -

svn - how to write post-commit hook to automatically synchronize two repositories - i trying synchronize 2 repositories using subversion (svn), , using visualsvn on both source , mirror servers. i able synchronize them manually, i.e. through command-line, want triggered automatically using post commit hook of master repository. i writing next code in post-commit hook of source repository (master) automatically sync mirror repository (slave): svnsync --non-interactive --sync-username syncuser --sync-password syncuserpassword sync mirror-repository-url but when check in file source repository (master) shows next error: **post-commit hook failed(exit code 1) output: svnsync:e230001:unable connect repository @ url 'mirror-repository-url' svnsync:e230001:server ssl certificate verification failed; certificate issued different hostname; issuer not trusted** but getting file in source repository in svn (master) not mirror repository (slave), tried manually givi

Spring bean scope and EJBs -

Spring bean scope and EJBs - i had been reading on spring framework documentation , came across line. as rule, utilize prototype scope stateful beans , singleton scope stateless beans. couldn't quiet digest it. isn't line above counter intuitive , wrong? take stateful ejbs prototypal beans makes sense wouldn't run against grain or thought of stateless ejb declare singleton bean? spring bean scope , ejb -- read section 5.5.2 - prototype scope spring scope ejb

html - How to swap particular row among list of row based on value scanned in text box in jquery -

html - How to swap particular row among list of row based on value scanned in text box in jquery - i'm developing web application in i'm generating table row dynamically based on value entered in text box. 1 condition, if come in same value twise (one after another), should not add together row. if come in 10 different values , @ 10th time if come in value entered row should come top in table. (it should not add together again). for illustration entering value 1,2,3,4,5,6,7,8,9,10 , 11th time entering value 1 in table 1 row should come @ top (1,10,9,8,7,6,5,4,3,2) . if entered 1,1 should add together row 1 time. please help me finish this. in advance. $(document).ready(function(){ var wholestring=""; /*to search shipment id through webservice: begin */ $('#searchkey').change(function(){ allboxes=new array(); allboxes[0]=0; $.ajax({ type : 'post', url : '@rout

Paypal Developer - Cannot create Sandbox Business Account plus Error Messages -

Paypal Developer - Cannot create Sandbox Business Account plus Error Messages - i trying set paypal dev app first creating 2 (personal , business) sandbox accounts. displays -facilitator.. business business relationship next error message when click on profile we experienced issues on our end while creating sandbox account. please delete , seek again. unfortunately check-box next business relationship grayed out , cannot delete it. when go create app says: there no sandbox business accounts associated, please create 1 , seek again. so have tried creating new sandbox business accounts. when click save see has updated total records one, still shows same amount of accounts (the facilitator , personal accounts created). anyone have thought on can/should do? can re-create whole developer business relationship somehow? i got randomly weekend , never figured out caused it... did work me though when went day or 2 later. gave me weird feeling using

For loop through names in GNU make -

For loop through names in GNU make - i have bunch of .dot files (for example, a.dot, b.dot, c.dot ) , want compile them .png files neato . currently, create command have looks this: neato -tpng -o a.png a.dot neato -tpng -o b.png b.dot neato -tpng -o c.png c.dot obviously, non-scalable, , i'd write take every file .dot extension, , compile equivalently-named .png file. i'm not sure how write such loop in create - help appreciated. this pretty much basic create 101: srcs = a.dot b.dot c.dot objs = $(srcs:%.dot=%.png) all: $(objs) %.png : %.dot neato -tpng -o $@ $< you don't "loops" in make; define targets , prerequisites. for-loop make

amazon web services - The specified key does not exist - While copying S3 object from one bucket to another -

amazon web services - The specified key does not exist - While copying S3 object from one bucket to another - i trying re-create s3 object 1 bucket , response looks - object(stdclass)#24 (3) { ["error"]=> array(2) { ["code"]=> string(9) "nosuchkey" ["message"]=> string(33) "the specified key not exist." } ["code"]=> int(404) ["headers"]=> array(1) { ["type"]=> string(15) "application/xml" } } here how code looks - var_dump($this->s3->copyobject('bucket_1','bucket_1/'. images/1.jpg, 'bucket_2', 'bucket_2/images')).die(); according method signature of copyobject need supply source object uri , destination object uri. anyone please help me know what's going wrong here ? thanks. finally fixed after few hours of looking amazon docs. here s3 object keys -http://docs.aws.amazon.com/amazons3/latest/dev/usingmetadata.h

vba - Combine multiple Excel workbooks into a single workbook -

vba - Combine multiple Excel workbooks into a single workbook - i novice @ visual basic. can utilize either excel 2010 or excel 2013 task. i have dozens of workbooks info on first worksheet of each. illustration one.xlsx, two.xlsx, three.xlsx, four.xlsx each contain info on respective sheet1. i need info on sheet1 each workbook combined single workbook sheets named file name of original workbook. illustration combined.xlsx have 4 sheets named one, two, three, four. in every case info on underlying worksheets should copied , combined in new workbook shown below. the format need i found macro / add-in online gets me close need using open files add together in choice. http://www.excelbee.com/merge-excel-sheets-2010-2007-2013#close the open files add-in allows me aggregate various workbook's worksheets single workbook. tabs not named name of original file. correct aggregation of sheets, wrong worksheet names. for underlying workbooks in same folder.

Efficient way to delete specific rows of a SAS dataset on a SQL Server -

Efficient way to delete specific rows of a SAS dataset on a SQL Server - i want delete latest 30 day records dataset. have couple of ways so. proc sql; delete server.data date >= today() - 30; quit; or data server.data; set server.data(where= (date>= today() - 30)); run; which way better? or faster procedures? the first approach faster. however approach leaves deleted observations in place (they marked deleted). causes difference between nobs , nlobs properties of table. if space consideration, i'd recommend sec approach (using macro variable constant in same manner). rebuild table without records. remember recreate indexes , constraints, destroyed in rebuild process.. edit: had suggested below faster, turned out not case - see joe's comment in thread.. proc sql; delete server.data date >= %eval(%sysfunc(today()) - 30); sql-server sas delete-row sql-delete

Not being able to add button click event in c# -

Not being able to add button click event in c# - i have code generates me buttons foreach loop. controls.button btn = new controls.button(); btn.button1.text = "details"; btn.location = new point(200, cnt); panel1.controls.add(btn); when seek after doesn't work. private void button1_click(object sender,eventargs e) { messagebox.show(""); } any idea? controls.button btn = new controls.button(); btn.id= "id" + counter; btn.button1.text = "details"; btn.location = new point(200, cnt); btn.click += button1_click; panel1.controls.add(btn); you should write ! aware in case of button in foreach method have same click event handler. have id + counter of buttons create differnce them. private void button1_click(object sender,eventargs e) { string id= ((button)sender).id; if(id == "value") { } else if(id == "another value") { messagebox.show("");

What index to use for mongodb? -

What index to use for mongodb? - i have documents this: { { "_id": objectid("5444fc67931f8b040eeca671"), "meta": { "sessionid": "45", "configversion": "1", "deviceid": "55", "parentobjectid": "55", "nodeclass": "79", "dnproperty": "16" }, "cfg": { "name": "test" } } the names , info testing atm. have total of 25million documents in db. , i'm using find() fetch specific document(s) in find() utilize 4 arguments in case, dnproperty, nodeclass, deviceid , configversion none of them unique. atm. have index setup simple as: ensureindex([["nodeclass", 1],["deviceid", 1],["configversion", 1], ["dnproperty",1]]) in other words have index on 4

javascript - After click, reverse animation on jQuery (Show/Hide) -

javascript - After click, reverse animation on jQuery (Show/Hide) - i'm trying utilize the: $(document).ready(function() { $('#showmenu1').click(function() { $('.menu1').slidedown("slow"); }); }); effect in jquery create div appear when trigger clicked, successfully. want animation reverse create div disappear, when same trigger clicked again. effect want create is: $(document).ready(function() { $('#showmenu1').click(function() { $('.menu1').slideup("slow"); }); }); any help appreciated. html example: <section id="showmenu1" style="background-color:#09f; color:#fff"> <h1>show div</h1> </section> <div class="menu1" style="display: none; background-color:#09f; color:#fff; padding:0; margin:0"> <ul style="padding:0px; margin:0px; position: relative; text-align: center;">

Confused about Java passing methods (by value or reference) -

Confused about Java passing methods (by value or reference) - this question has reply here: is java “pass-by-reference” or “pass-by-value”? 57 answers guys, please, can clarify me? as understand (please right me if wrong), when pass variables method or class i'm passing value, isn't it? if it's true, why java has method .clone()? why inquire question, because confused...here code: if pass variables using next code , modify them within dialog, original values (outside) changed. dialogchoosepayment mdialogchoosepayment = new dialogchoosepayment(mcontext, (arraylist<payment>) defaultvalues.getpayment(), (arraylist<payment>) selectedvalues); mdialogchoosepayment.show(); but, if utilize next one, variables values (original variables outside) not changed. dialogchoosepayment mdialogchoosepayment = new dialogchoosep

html - CGI table with perl -

html - CGI table with perl - i trying build login form cgi , using perl . sub show_login_form{ homecoming div ({-id =>'loginformdiv'}), start_form, "\n", cgi->start_table, "\n", cgi->end_table, "\n", end_form, "\n", div, "\n"; } i wondering why don't need add together cgi-> before start_form if don't include before start_table , end_table , "start_table" , "end_table" printed strings ? thank help. why can utilize subroutines? because importing them using next utilize statement: use cgi qw(:standard); as documented in cgi - using function oriented interface, import "standard" features, 'html2', 'html3', 'html4', 'ssl', 'form' , 'cgi'. but not include table methods. to them too, can modify utilize statement following: use cgi qw(:standard *table); why removing

.net - VB.NET - PSEXEC and SecureString Class? -

.net - VB.NET - PSEXEC and SecureString Class? - i have tool i'm working on in vb.net lets users in org trigger number of remote gui processes on pcs. phone call psexec within application , pass user , password of service business relationship have set up. i want security conscious possible , looking @ using securestring class store user , password. question this: if store service acct. user , password using secure string, pass these psexec when phone call it, psexec transmit obfuscated password on network or transmit plain string? any help appreciated little new me! thanks! edit: code utilize phone call psexec: private sub startprocess(byval remotepc string, byval remotepc_url string, byval remoteuser string, byval password string) dim proc new system.diagnostics.process proc.startinfo = new processstartinfo("cmd") proc.startinfo.arguments = "/k psexec \\" & remotepc & " -u " & remoteuser & " -

PHP output buffer flush and then clean -

PHP output buffer flush and then clean - i trying this: display "a" 1 second, clear screen display "b" 1 second, clear screen display "c". this have far, buts it's not working: header("content-type: text/html; charset=utf-8"); header("cache-control: no-cache, must-revalidate"); header("pragma: no-cache"); set_time_limit(0); ob_implicit_flush(1); echo "a"; ob_flush(); ob_clean(); sleep(1); echo "b"; ob_flush(); ob_clean(); sleep(1); echo "c"; output buffer doesn't work way, it's 1 way street. has been passed browser has been sent server , don't have access anymore info , don't have command on info user has received. the way send command characters clear screen, don't fall characters browsers accept. in theory send \x08 (backspace), not work on else allows using these ascii command characters. working terminal or graphical browser? firs

matlab - Histogram equalization function -

matlab - Histogram equalization function - i'm trying implement histogram equalization using code: clc a=input('please come in image adress','s'); iimg=imread(a); iimg1=double(iimg); histi=imhist(iimg); mmax=max(iimg1(:)); h=histi/numel(iimg1) cdf=cumsum(h) cdf=cdf*double(mmax); c=uint8(cdf); subplot(1,3,1) bar(c) subplot(1,3,2) imhist(iimg) subplot(1,3,3) imhist(histeq(iimg)) is code wrong? don't expected results. i code: what wrong? unless image rgb , code works (i used cameraman ). matlab image-processing histogram

less - Can maven lesscss plugin output to the same directory? -

less - Can maven lesscss plugin output to the same directory? - i trying utilize maven plugin lesscss compile less css. can plugin compile less css , set css same directory less? (my less files in different directory) like: styles/something/something.less styles/otherthing/otherthing.less after compile, should this: styles/something/something.css styles/otherthing/otherthing.less or anyother suggestion? thx help: ) yes can, won't confusing? from documentation <plugin> <groupid>org.lesscss</groupid> <artifactid>lesscss-maven-plugin</artifactid> <version>1.7.0.1.1</version> <configuration> <sourcedirectory>${project.basedir}/src/main/webapp/less</sourcedirectory> <outputdirectory>${project.build.directory}/${project.build.finalname}/css</outputdirectory> ... </configuration> ... </plugin> you can set

javascript - PHP function not getting called through ajax -

javascript - PHP function not getting called through ajax - i have ajax phone call php function : $.ajax({ url: 'link', type: 'post', datatype : 'json', data: {'txtfromorderdate' : '2014-08-01','txttoorderdate' : '2014-08-05'}, success: function() { window.location = 'link'; } }); php function as: public function createzipaction($txtfromorderdate,$txttoorderdate) { date_default_timezone_set('australia/melbourne'); $date = date('m:d:y h:i:s', time()); $exportbatch = $date; $order = $this->gettablegateway('order'); $select = new select(); $select->from('order') ->join('user', 'order.user_id = user.id', array('email')) ->where ("order.created between ".$txtfromorderdate." , '2014-08-03' "); //->where ('order.created between '.

date - SQL SERVER - CHANGE COLUMN NAME TO VALUE -

date - SQL SERVER - CHANGE COLUMN NAME TO VALUE - i have table this: id | date 1 | date 2 | date 3 1 | 2014-08-01 | 2014-08-02 | 2014-08-03 and need output this: id | date field name | date value 1 | date 1 | 2014-08-01 1 | date 2 | 2014-08-02 1 | date 3 | 2014-08-03 have tried dynamic unpivoting unions seems messy. there best practice way of doing this? i think unpivot best practice here. don't find messy much confusing, maybe because don't reach often. give results you're looking for: select id, [date field name], [date value] mytable unpivot ([date value] [date field name] in ([date 1], [date 2], [date 3])) x sql-server date

ruby on rails - Namespaced Routes give me Unitialized constant Admin::Towers -

ruby on rails - Namespaced Routes give me Unitialized constant Admin::Towers - the 2 particular routes im having issues admin/inspections , admin/activities. when first save routes.rb, whichever route load first works other not, gives me error: "unitialized constant admin::towers" i have next routes setup. namespace :admin #...etc... resources :inspections, only: [:index,:show], controller: 'towers/inspections' resources :activities, only: [:index], controller: 'towers/activities' end as you've namespaced resources, controllers should reside within app/controllers/admin/* , have name, i.e. inspections: class admin::inspectionscontroller i'm guessing have: scope '/admin' resources :inspections, only: [:index,:show], controller: 'towers/inspections' resources :activities, only: [:index], controller: 'towers/activities' end ruby-on-rails ruby-on-rails-3 rails-routing

c++ - asynchronous read write with device file -

c++ - asynchronous read write with device file - i writing binary info device fie /dev/itun. void ahaconnector::asyncwritedata(vector<uint8_t> packedmessage) { cout<<"\n async write info packed message"; devicestreamdescriptor.assign(device); boost::asio::write ( devicestreamdescriptor, boost::asio::buffer(packedmessage) ); readbuffer.resize(1024); devicestreamdescriptor.async_read_some(boost::asio::buffer(readbuffer), boost::bind(&ahaconnector::readheader, this, boost::asio::placeholders::error(), boost::asio::placeholders::bytes_transferred() )); io_service.run(); } void ahaconnector::readheader(const boost::system::error_code &ec, std::size_t bytes_transferred) { if(!ec) { std::cout<<"\n bytes

c# - Adding image from folder to dropdown list -

c# - Adding image from folder to dropdown list - i want add together images folder , list in dropdown . application has folder name flags containing flags images , country name. how add together them dropdown . try using system.io.directory.getfiles , system.io.path.getfilename http://msdn.microsoft.com/en-us/library/system.io.directory.getfiles(v=vs.110).aspx http://msdn.microsoft.com/en-us/library/system.io.path.getfilename(v=vs.110).aspx something (haven't tried it) // process list of files found in directory. string [] files = directory.getfiles(yourdirectory); foreach(string file in files) { string language = path.getfilename(file); ddlflags.items.add(new listitem(language, file)); } next time, improve question describing have tried far, easier help you. c# visual-studio-2013 office-interop

java - Optional jDBI parameter -

java - Optional jDBI parameter - is possible have optional (null) parameters jdbi queries? i'm attempting optional parameters working in database query. working dropwizard. @sqlquery("select * \n" + "from posts \n" + "where (:authorid null or :authorid = author_id)") public list<post> findall(@bind("authorid") optional<long> authorid); the query works when authorid passed, gives me error when null: org.postgresql.util.psqlexception: error: not determine info type of parameter $1 this resource route calling from: @get public arraylist<post> getposts(@queryparam("authorid") long authorid) { homecoming (arraylist<post>)postdao.findall(optional.fromnullable(authorid)); } from i've read, possible do, i'm guessing missing or have obvious mistake. help appreciated! fyi - have tried without guava optional (which supported dropwizard) -- sending authorid

javascript - Search filter not working on IE 8 -

javascript - Search filter not working on IE 8 - i'm using http://codepen.io/anon/pen/gkrln have re-create code , mix table data. works on firefox , chrome. i have change: document.getelementsbyclassname('light-table-filter2'); to inputs = $(".light-table-filter"); but im not sure how alter document.getelementsbyclassname(_input.getattribute('data-table')); create work on ie8? with changes have made work on firefox , chrome , how can work on ie8? var lighttablefilter; lighttablefilter = (function() { var _filter, _input, _oninputevent; _input = null; _oninputevent = (function(_this) { homecoming function(e) { var row, table, tables, tbody, _i, _j, _k, _len, _len1, _len2, _ref, _ref1; _input = e.target; tables = document.getelementsbyclassname(_input.getattribute('data-table')); (_i = 0, _len = tables.length; _i < _len; _i++) { table = tables[_i]; _ref = table.tbodies

java - How to include HTML in OGNL expression language in Struts 2 -

java - How to include HTML in OGNL expression language in Struts 2 - i working on struts 2. doing projection of collection in jsp page using ognl look language. i have 1 list based collection in action class, accessing on jsp page this: <s:iterator value="lsemp.{name + '<b>---</b>' + address}"> //lsemp list based collection <s:property /><br> </s:iterator> i want output this: rajiv --- n.delhi nakul --- mumbai vinay --- banglore //"---" beingness bold. but <b></b> tag in <s:iterator value=""> not getting accepted. , printing this: rajiv <b>---</b> n.delhi nakul <b>---</b> bombay vinay <b>---</b> banglore i want know there way enable html in ognl expression. you can turn off escape html symbols when printing out <s:property escapehtml="false"/><br> java jsp struts2 ognl

SQL Server Supported Transaction Models -

SQL Server Supported Transaction Models - i have question sql server transaction models. much know, have 5 models or modes of transaction in database(flat, distributed, nested, multilevel , chained). wanna know 1 of them exist in sql server (any version) or in improve way, sql have kind of transaction model , back upwards them? surfed web couldnt find related question. please help me a quick search suggests next article exploring sql server's distributed transactions, should give starting point actual question. update from technet's documentation on transactions: explicit transactions explicitly start transaction. autocommit transactions each individual transact-sql statement committed when completes. implicit transactions the next statement automatically starts new transaction. when transaction completed, next transact-sql statement starts new transaction. so while terminology little different, flat, distributed, nested , chained supported. multilevel

How to list files in a file system based on the limit : java -

How to list files in a file system based on the limit : java - how list files available in file scheme starting number , ending number? like if there 500 files in c:\test\ how list files starting 1 20 give start number , end number based on list files available particular file path. i trying in java i tried thing , gives me files available given path public static list<string> loadallfiles(string fileslocation) { //find os //string osname = system.getproperty("os.name"); //replace file path based on os fileslocation = fileslocation.replaceall("\\\\|/", "\\"+system.getproperty("file.separator")); list<string> pdffiles = new arraylist<string>(); if (log.isdebugenabled()) { log.debug("in loadallfiles execute start"); } file directorylist = new file(fileslocation); file[] fileslist = directorylist.listfiles();

javascript - Change margin, width, height, top, left, padding from all elements between a div -

javascript - Change margin, width, height, top, left, padding from all elements between a div - i got design in total hd resolution, planned presentation in solution, want bit responsive. have alter these parameters: margin, padding, width, height, top, left on fly, maybe got solution me. i tried next , works images width , height: // set array resize (0 => width of window, 1 => resize (yes / no)?, 2 => how much per cent have set away var resize_pool = new array(parseint($(window).width()), false, 0); if(resize_pool[0] < 1920) { resize_pool[1] = true; resize_pool[2] = (100 * resize_pool[0]) / 1920; resize_pool[2] = 100 - math.floor(resize_pool[2]); } // have resize? if(resize_pool[1] == true) { $("#content img").each(function(index, element) { $(this).css('width', 'calc(' + $(this).width() + 'px - ' + resize_pool[2] + '%)').css('height', 'calc(' + $(this).height() + 'px - 

sql - How to insert into ReportServer.DBO.Subscriptions -

sql - How to insert into ReportServer.DBO.Subscriptions - sql server 2005 study server how can subscription manually created? reportserver uses proc createsubscription add together row subscriptions table. i have new shared schedule. reports subscribe existing schedule, need subscribe the new shared schedule, using same attributes (the difference between schedules 1 timed, , other called code). the issue see generating subscriptionid (unique identifier). it's not set primary key, can't leave out parameter insert statement. is there way utilize same method generating subscription id reportserver uses, or can generate own guid, or reduced recreating these subscriptions manually... thanks in advance. sql sql-server reporting-services reportserver

android - Toolbar NavigationIcon loose theme -

android - Toolbar NavigationIcon loose theme - i utilize 2 themes app depending of actionbar color want (dark or lite color) : - theme.appcompat.light.noactionbar - theme.appcompat.noactionbar here's toolbar layout : <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minheight="?attr/actionbarsize" app:theme="@style/themeoverlay.appcompat.actionbar" > <textview android:id="@+id/toolbar_title" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_gravity="center" android:maxlines="1" android:ellipsize="end" android:textappearance="?android:attr/textappearancelarge" /> </android.support.v7.widget.toolbar> in manifest, s

c++ - P/Invoke: Memory corruption with pointer -

c++ - P/Invoke: Memory corruption with pointer - i'm wrapping part of fbx sdk (closed, public api) mono (so com, cli aren't options) , bunch of extern's, , going until had homecoming non-pointer instance. see here the crucial point have homecoming c++ call. because don't know how you'd without pointer, returned such: fbxapi fbxproperty* object_getfirstproperty(fbxobject* obj) { homecoming &obj->getfirstproperty(); } ..and it's not until seek next snippet "system.accessviolationexception : attempted read or write protected memory. indication other memory corrupt." message. fbxapi const wchar_t* property_getname(fbxproperty* prop) { int c = prop->getsrcpropertycount(); homecoming l"test"; } if utilize identical code using same calls in c++, it's fine. i've done ~20 function calls in same manner without having "pointerfy" it, , they're fine too, don't think dllimport's

python - Matplotlib creates 30 page pdf but individual pages pulled in by latex seem to include most of big pdf -

python - Matplotlib creates 30 page pdf but individual pages pulled in by latex seem to include most of big pdf - this continuation of question asked on latex forum here appears matplotlib issue. here link http://tex.stackexchange.com/questions/207527/using-includegraphics-makes-pdf-very-large this matplotlib code created pdf. set file pdf pp = pdfpages(pdfname) i phone call next code each time want create new figure on new page font = {'family' : 'normal','weight' : 'normal','size' : 18} plt.rc('font', **font) fig = plt.figure(figsize=(8.27, 11.69), dpi=100) ax1 = plt.subplot(1,1,1) ax1.set_xlabel(xlabel,fontdict={'fontsize':22}) ax1.set_ylabel(ylabel,fontdict={'fontsize':22}) ax1.set_xlim([xmin,xmax]) ax1.set_ylim([ymin,ymax]) numlines = len(cond1values) titlelabel = '$' + shortname2 + "=" + str(cond2value) + '$' ax1.set_title(titlelabel) ' 2 vectors of info

ios - Getting autocomplete to work in swift -

ios - Getting autocomplete to work in swift - i trying implement autocompletion, can't find illustration works in swift. below, i'm tring convert ray wenderlich's autocompletion tutorial , illustration code 2010. finally, code compiles, table containing possible completions not appear, , don't have experience see why not unhidden shouldchangecharactersinrange. class viewcontroller: uiviewcontroller, uitableviewdelegate, uitableviewdatasource, uitextfielddelegate { @iboutlet weak var textfield: uitextfield! allow autocompletetableview = uitableview(frame: cgrectmake(0,80,320,120), style: uitableviewstyle.plain) var pasturls = ["men", "women", "cats", "dogs", "children"] var autocompleteurls = [string]() override func viewdidload() { super.viewdidload() autocompletetableview.delegate = self autocompletetableview.datasource = self autocompletetableview.scrollenabled = true autocompletetabl

java - Exception while using .setClob() -

java - Exception while using .setClob() - i want insert string via java programme oracle db in table having column type clob . using next code preparedstatement stmt=conn.preparestatement("insert json_test values(?,?)"); stmt.setint(1,counter); stmt.setclob(2,new stringreader(s)); but while executing getting exception: java.lang.exception: 1 - oracle.jdbc.driver.oraclepreparedstatementwrapper.setclob(iljava/io/reader; can jdbc version using? works correctly me with dependency> <groupid>com.oracle</groupid> <artifactid>ojdbc6</artifactid> <version>11.2.0.3</version> </dependency> java jdbc prepared-statement clob

Running CMD commands from C# -

Running CMD commands from C# - first of all, searched lot avoid asking duplicate question. if there one, delete question immediately. all solutions on web suggesting utilize process.startinfo one how to: execute command line in c#, std out results i dont want run batch file, or .exe. i want run commands on cmd like msg /server:192.168.2.1 console "foo" or ping 192.168.2.1 and homecoming result if there one. how can ? those commands still exe files, need know are. example: c:\windows\system32\msg.exe /server:192.168.2.1 console "foo" c:\windows\system32\ping.exe 192.168.2.1 c# cmd

c# - How to validate a string value that should only return true if numbers are entered -

c# - How to validate a string value that should only return true if numbers are entered - i need extend code phone call getreasonforfailure method if other numbers returned. i.e 123 = invalid abc = invalid 1234567890 = isvalid null = isvalid using system.linq; namespace worksheetvalidator.rules { public class importcommoditycode : irule { public bool isvalid(string value) { homecoming string.isnullorempty(value) || value.length == 10 ; } public string getreasonforfailure(string value) { homecoming string.format("[{0}] codes should 10 digits long , contain numbers", value); } } } int32.tryparse cannot used in context because 9999999999 bigger int32.maxvalue overflows , conversion fails. utilize long.tryparse or, if want ienumerable solution, write public class importcommoditycode : irule { public bool isvalid(string value) { homecoming string.isnullorempty(value) ||

vba - How do I check for the presence of a valid email (digital) signature attached to an Outlook MailItem (email message)? -

vba - How do I check for the presence of a valid email (digital) signature attached to an Outlook MailItem (email message)? - is there way retrieve digital signature attached mailitem using vba? verify validity using vba? i'm pretty much limited vba in regard. i've tried inspecting sender , mailitem objects can't see signature object. outlook represents signed/encrypted messages regular ipm.note mailitem objects. goes far returning false imessage mapi interface mailitem.mapiobject property. you can see in outlookspy - select signed message, click imessage button on outlookspy ribbon. pr_message_class ipm.note. select pr_entryid property, right click, select imapisession::openentry. real message pr_message_class = ipm.note.smime.multipartsigned. can see attachment contains data. you pretty much limited extended mapi (c++ or delphi only) or redemption (any language - wraps extended mapi) if want distinguish signed/encrypted message regular ones. redempt

c# - Identity: Authentication in Two Different asp.net mvc5 Applications -

c# - Identity: Authentication in Two Different asp.net mvc5 Applications - i have 2 different asp.net mvc5 application in same solution authenticate utilize different tables. when execute application , login in 1 of them, other application takes user authenticated in first application. this because of authentication cookie: when user authenticate himself in first project, creates cookie, sec project receives , accepts cookie. seek alter default auth cookie name in web.config files. c# asp.net-mvc asp.net-identity

linux - invoking function and command using awk -

linux - invoking function and command using awk - hi script works fine, calls function when there cronjob running under root usage () { # print usage echo "usage function" } # export -f usage ps -ef | awk '{if ($0 ~ /crond/ && $1 == "root") {system("/usr/bin/env bash -c usage") }}' however, in add-on calling function print $2 or phone call sec command. cannot syntax right. can help please. in short, how run multiple commands when status met? in illustration above, in add-on running usage() function run sec function , print $2 ( process id ). thanking in advance try running multiple commands separated semicolon for illustration : ps -ef | awk '{if ($0 ~ /crond/ && $1 == "root") {system("/usr/bin/env bash -c usage"); system("/usr/bin/env bash -c func2"); print $2 }}' linux bash function awk

sql - If this month has 28 days, find all customers with a bill date of 29, 30, or 31 -

sql - If this month has 28 days, find all customers with a bill date of 29, 30, or 31 - i have client bill day table looking this: create table customer_billing ( customer_name varchar(20) ,bill_day int ) with info like 'abc', 1 'def', 10 'ghi', 28 'jkl', 29 'mno', 30 'pqr', 31 every day, send bill customers bill day equal current day [i.e., where bill_day = extract(day sysdate) ]. however, if customer's bill day 31, today lastly day of month contains 28, 29, or 30 days, send client bill today well. this have far. logic works think there improve way accomplish it. select customer_name customer_billing 1 = 1 , bill_day = (case when bill_day <= extract(day last_day(sysdate)) extract(day sysdate) when extract(day sysdate) = extract(day last_day(sysdate)) , bill_day > extract(day last_day(sysdate)) bill_day

R: Plotting 2 Matrices in one plot -

R: Plotting 2 Matrices in one plot - i have 2 matrices follows: m1: fy1301 fy1302 fy1303 fy1304 fy1305 fy1306 146 56 159 129 54 535 137 113 337 140 160 777 281 111 331 198 231 875 273 55 480 205 356 887 m2: fy1301 fy1302 fy1303 fy1304 fy1305 fy1306 34 5 99 82 121 180 89 98 252 33 311 310 101 77 252 45 284 265 170 64 125 33 187 288 i trying plot both matrices on same plot. what doing giving me 2 different plots. next code: par(mar=c(5.1, 4.1, 4.1, 8.1), xpd=true) matplot(m1, type = c("b"), pch = 1, col=1:6, xlab = "month", ylab = "total sessions med1") legend("topright", legend = c("fy13 01","fy13 02","fy13 03","fy13 04","fy13 05","fy13 06"

Vlookup to copy color of a cell - Excel VBA - macro error -

Vlookup to copy color of a cell - Excel VBA - macro error - i have followed thread, (vlookup re-create color of cell - excel vba) copied vba , run macro , have error showing @ line: set extractdestrange = fromcell.parent.range(destaddr) the lookup info on sheet within same workbook don't think that's issue. ideas welcome. give thanks you. excel vba excel-vba

socket.io - socket emit is undefined in lynckia licode gateway -

socket.io - socket emit is undefined in lynckia licode gateway - i using licode platform webrtc gateway , new this. followed installation guide @ http://lynckia.com/licode/install.html when run illustration , /createtoken method not executing , failed. then when click 'toggle recording' button in page, gives me next error in console. uncaught typeerror: undefined not function erizo.js:143 line contains socket.emit function. there reason why socket.emit not working in browser , cretetoken method not working properly. socket.io licode

Parse.com data import with objectId preserved -

Parse.com data import with objectId preserved - is there way import data, preferably json parse database preserving objectids , existing relationships? found many old post mention can preserve objectid if utilize info browser button ui tools, programmatically in order automate task. of course of study can that. existing object ids , create new objects using same ids , save them on new table/parse project. parse.com

.net - C# - How can I set my Datagrid enabled = false and still have a scrollbar without using readonly()? -

.net - C# - How can I set my Datagrid enabled = false and still have a scrollbar without using readonly()? - i requested create app read barcodes , update datatable on screen update database after info gathering. the problem there's column must updated @ execution time every time barcode read, user shouldn't able edit cell writing on device keyboard. so tried set columns readonly, when this, it's not possible update value on datatable, tried set datagrid enabled = false, scrollbar stopped working, , need because it's little device , there other columns user should able see. is there simple way solve ? i'm using .net compact 3.5 this code button loads datagrid: datatable tabela = new datatable(); datatable codbarras = new datatable(); private void button1_click(object sender, eventargs e) { ultimopedido = textbox1.text; seek { fbdatareader leitor; fbdatareader leitorbarras; string query1 = "select cast

arrays - Multiple controllers in a meanjs form, submitting empty values -

arrays - Multiple controllers in a meanjs form, submitting empty values - i calling values database , putting them in select box in form, however, whenever click on submit, submits empty value, thinking because using multiple controllers in form, have gathered, have scope in controllers, have been unable that attached re-create of create-view file, highlited portions multiple controllers. please how create work? give thanks much <section data-ng-controller="candidatescontroller"> <div class="page-header"> <h1>new candidate</h1> </div> <div class="col-md-12"> <form class="form-horizontal" data-ng-submit="create()" novalidate> <fieldset> <div class="form-group"> <label class="control-label" for="name">name</label> <div class="controls">