Posts

Showing posts from March, 2012

sql server - SQL pivot query error: Unclosed quotation mark -

i have 3 tables (1. emp, 2. onleave,3.daysweeks). im trying write pivot query displyas empname, , calenderdates columns) im getting following error, when try run pivot query. 1.unclosed quotation mark after character string '2016-12-31])) pvt'. 2.incorrect syntax near '2016-12-31])) pvt' declare @cols nvarchar(max), @query nvarchar(max) select @cols = stuff((select ',' + quotename([caldate]) daysweeks xml path(''), type).value('.', 'nvarchar(max)') ,1,1,'') select @query = 'with cte ( select empdays.employee,empdays.caldate, isnull(v.vacationtype,1) leavestatus dbo.onleave v right outer join (select e.empid employee, dw.caldate caldate, dw.dayofweekname downame daysweeks dw, dbo.emp e dw.calyear = 2016 , dw.monthnumber=1) empdays on v.empid = empdays.employee , v.startingdate <= empdays.caldate , v.endingdate >= empdays.caldate ) sele

java - Trying to bind glide in Xamarin -

i want bind library glide in xamarin, getting stuck on com.bumptech.glide.bitmapoptions . as interface, binds ibitmapoptions , can't find name in namespace. have tried looking in output folder, interface seems have disappeared. i looked @ other errors getting , binding project can't find 2 other interfaces. looked in java code, , see uses <?, ?, ?, ?> generic syntax. is there problem syntax makes cannot bound? if so, how solve this? glide xamarin binding on github: https://github.com/thanhdatbkhn/glidexamarinbinding

asp.net web api - Web API app with OWIN 'SystemWeb' on Azure App Service -

i creating app uses identity 2.1.0 framework in .net. started project in visual studio 2015 empty web app (template). now, use microsoft.aspnet.webapi.owin , , microsoft.owin.host.systemweb nuget packages in project. understand owin specification made avoid monolithic frameworks , specify how smaller application components interact servers. however, have requirement deploy azure app services. i have found examples (blogs) people deploy owin web api app self-hosted azure cloud services worker role. don't want this, don't use cloud service. since using microsoft.owin.host.systemweb , going able deploy azure app service (which assume manages internal iis instance) ? .net ecosystem newbie here - please excuse me possible redundancies in question. microsoft.owin.host.systemweb designed hosting in iis , azure app service web apps hosted in iis, want (in fact, self-hosting won't work azure app service).

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

i'm working on app using core data , nsfetchedresultcontroller many reasons switch use realm. saw there "realm version" of nsfetchedresultcontroller on github wouldn't compatible current code using core data. the view controller displaying list of people same school, address book. list sublist of people studied in same city. so thinking make 1 unique request database retrieve list of people , filter locally list within 1 dictionary per school [string: anyobject] string section name within tableview , anyobject array of people. first solution, make nsfetchedresultcontroller each school predicate filtering location. delete actions etc.. handled delegates -> not compatible realm create dictionaries , update them each actions... -> works realm it's annoying code. any better solution? edit: i need clarify request: i'd write class inherit uitableviewcontroller. this class has list of people sorted in alphabetical order the tableview has

swift2 - converting AnyObject to Array list of Strings in swift -

i'm new swift , i'm extracting data parse database. data column stored array in database managed extract anyobject , want display each item. anyobject displaying 1 entry instead of array list class peopletable: uitableviewcontroller { //let textcellidentifier = "textcell" //var window: uiwindow? //let emptyarray: [anyobject] = [] var userfriends: [anyobject] = [] override func viewdidload() { super.viewdidload() queryfortable() print(userfriends) } func queryfortable() { let relationquery = pfquery(classname:"user_info") relationquery.wherekey("userid", equalto:"id123") var userfrnds = try? relationquery.findobjects() eachfriend in userfrnds! { self.userfriends.append(eachfriend["friends"]) } } print(userfriends) command out put : [( rudzani, terrence, thendelano, "big-t", smallboy )] i want out put : rudzani, terrence, thendelano, &

Ruby Write in CSV file by columns from arrays? -

i generate csv file severals arrays. code: require 'csv' csv.open("csvfile.csv", "ab") |csv| csv << [array1] csv << [array2] csv << [array3] end i need output format: array1,array2,array3 array1,array2,array3 array1,array2,array3 array1,array2,array3 array1,array2,array3 thx help according post, did mean array1, array2, array3 stores values of 3 columns of table, , row index identified index of values in these arrays? can first group columns together, transpose on 2-d array , write csv file row row. require 'csv' table = [array1, array2, array3].transpose csv.open('csvfile.csv', 'ab') |csv| table.each |row| csv << row end end you'll csv file this: array1[0], array2[0], array3[0] array1[1], array2[1], array3[1] array1[2], array2[2], array3[2] ...

php - replace xml/svg element attribute for specific element only -

i have 'xml` this, <text> <tspan fill='rgba(0,0,0,0)'>abc</tspan> </text> <rect fill='rgba(0,0,0,0)'></rect> i trying replace rgba( rgb( , replacing instances occur in data. want replace instances tspan tag only. tried str_replace replacing instances data. output should this <text> <tspan fill='rgb(0,0,0,0)'>abc</tspan> </text> <rect fill='rgba(0,0,0,0)'></rect> try regexp: rgba(?=(.*)<\/tspan>) tested here - regex101 $re = "/rgba(?=(.*)<\\/tspan>)/"; $str = "<text><tspan stroke='' opacity='' fill='rgba(0,0,0,0)'>abc</tspan><tspan fill='rgba(0,0,0,0)'><h1>anything</h1></tspan></text><rect fill='rgba(0,0,0,0)'></rect>"; $subst = "rgb"; $result = preg_replace($re, $subst, $str);

c# - Split the string and bring it to new line if string contains "<br>" and the string values are retrieved from a single column of a database -

split string , bring new line if string contains " " , string values retrieved single column of database using linqdatasource. eg: if string in column is... 1) address 1: addess1 < br> 2) address 2: addres2 the required output : 1) address 1: addess1 2) address 2: addres2 you use replace function. text.replace("<br>", "\n"); this replace break-line new-line. therefore wouldn't need split command.

c - Do I need to free the returned pointer from localtime() function? -

i reading manpages time.h . got far: time_t = time(0); struct tm * local = localtime(&now); now can work time, far good, not find information if duty free() variable local or not. quoting man page the 4 functions asctime() , ctime() , gmtime() and localtime() return pointer static data , hence not thread-safe. [...] so, need not free() returned pointer.

mysql - Declarative SQL Schema Migrator -

all of sql database schema migration tools can find ask define schema discrete set of migration steps, amount sequences of create/alter/drop statements. i'm looking tool enables me describe schema declaratively rather procedurally, ie. single set of create table statements or in other format, migrator inspect live database (eg. using information_schema tables) , make changes required have match schema i've described. does such tool exist? thanks have @ redgate tools, have compare tool , extension generate deployment scripts used flyway: "mysql compare": https://www.red-gate.com/products/mysql/mysql-compare/ flysql: http://www.red-gate.com/products/flysql/ ed

asp.net - How can i return array of object from web service with c#? -

Image
i want write simple web service return user array object string c#,write code in server web service: public string[] mymethod() { string [] mytemp=new string[10]; for(int i=0;i<10;i++){ mytemp[i]=i+1.tostring(); } return mytemp; } that's code return me output: but want return this: <mymethodresult> <string> <name>user1</name> </string> <string> <name>user2</name> </string> <string> <name>user3</name> </string> </mymethodresult> you can't return xml structure without informing web service type want return. need create class has [serializable] attribute , add properties resemble result you're expecting , class 1 return on web method. may refer microsoft link

excel - bloomberg and updating formula if holidays give NA -

we use bdh function closing prices @ end of each trading day, , list of different types of securities , indices @ once. currently every bdh-of-index in list refers same date in top of sheet, , if 1 index gives na because there no trading on day, manually make if refer cell date. =bdh($b4&" index","px_last",$i$1,$i$1) where b4 refers index, spx etc, , i1 = yesterday's date. i've written vba routine updates dates @ top, want check if of indices gives na, and, if so, let 1 refer cell date automatically. can give me advice on how check values in row ranging c4:c20, , change cell formula uses. or should alter formula well? you use override instead: =bdh($b4&" index","px_last",$i$1,$i$1,"days=a,fill=p") that retrieve last available price of yesterday's close, may day before yesterday's close (or earlier date) if specific instrument did not trade yesterday.

tree - CakePHP, how can I find all products associated with sub categories when parent category given? -

i've got 2 tables setup use tree behavior, manufacturers, , categories. products can belong 1 category , 1 manufacturer, manufacturers(child) owned other manufacturers(parent), , likewise categories(child) subcategory of another(parent). i want following: given category id (parent), find products in subcategories given manufacturer id (parent), find products in child manufacturers i have tried following (in products controller): $conditions['product.category_id'] = $this->product->category->children($id,false,'id'); $this->paginate = array( 'conditions' => $conditions, 'limit' => 21 ); $products = $this->paginate('product'); $this->set(compact('products')); but gives me this: `product`.`category_id` in (array, array, array, array, array, array) if print_r can see grabbing information need(see below), how can it, , there better way this? array ( [produc

html - CSS: Dynamically spacing two elements within in Div -

Image
i have placed 2 elements within div, 1 textarea tag , other time tag. time tag placed on div. when textarea has few words, space between textarea tag , time fine. when textarea contains many characters covers time tag shown in picture below my challenge how can maintain distance dynamically between textarea , time tag despite number of characters in time tag. css code show attempt .messages textarea[readonly] { font-size: 15px; font-family: "helvetica neue"; margin: 0 0 0.2rem 0; color: #000; word-wrap: break-word; resize: none; overflow: hidden; min-height: 5px; height: 1px; min-height: inherit; background: #c2dfff; margin-bottom: 0px; z-index: 10; } .messages time { font-size: 1.0rem; color: #696969; float: right; position: absolute; bottom: 10px; right: 0; z-index: 40; padding-right: 5px; } this html view <div class="message"> <textarea readonly elastic>{{ msg.content }}</textarea> &

To add a user with a roster in the create user Rest API -

i have created user using create user api. , have added roster user using different api.below mentioned 2 urls http://example.org:9090/plugins/restapi/v1/users http://example.org:9090/plugins/restapi/v1/users/testuser/roster does create user or other api support both above things together..is there api takes roster name parameter while adding user, , both things create user , roster?? suggestions appreciated.thanks in advance. there no way create user , create user roster entries in 1 request. need create user @ first , later add entries on second request. ps: i'm developer openfire rest api plugin

objective c - Can anyone point to a tutorial of adding new functions in ddmathparser? -

i new programming. want add new functions such derivatives , integrations ddmathparser . 1 can find short tutorial on ddmathparser 's wiki page https://github.com/davedelong/ddmathparser/wiki/adding-new-functions . however, can't follow because it's short , after reading several times, still can't understand it's doing. can elaborate steps add new function or give me more detailed tutorials of doing this? did research can't find one. much. ddmathparser author here. here's how add multiply two function: ddmathevaluator *evaluator = [ddmathevaluator sharedmathevaluator]; // function takes arguments, variable values, evaluator, , error pointer // , returns new expression [evaluator registerfunction:^ddexpression *(nsarray *args, nsdictionary *vars, ddmathevaluator *eval, nserror *__autoreleasing *error) { ddexpression *final = nil; // multiplyby2() can handle single argument if ([args count] == 1) { // argument , wrap in

python - SSL Server getting error -

Image
i had installed python,pip,aws cli , boto in 12.04 05 lts client desktop. , have downloaded domjudge ami file pc following link https://github.com/ubergeek42/domserver-ami . , changed ‘baseami’ , ‘region in createami.py file ,after tried running script unfortunately got error ssl server getting error. details steps images attached mail 1) python version 2) installed boto package via pip using following command sudo pip install boto 3) test boto has installed our environment 4) provided following details through aws configure command aws access key id, aws secret access key , default region name, default output format 5) tried run createami.py got following error so kindly suggest how can solve problem

datetime - Pandas to_datetime returns error for perfectly fine python time -

so have bunch of data has timestamps in python epoch time format, using to_datetime() function returns valueerror: unconverted data remains: 00 here's code import pandas pd print pd.to_datetime('1451080800', format='%y%m%d') what's going wrong here ? since epoch time, think want this: in [44]: pd.to_datetime(int('1451080800'), unit='s') out[44]: timestamp('2015-12-25 22:00:00') note int(..) around string. when specifying unit (epoch in seconds since 1970), argument needs integer.

wordpress - Php mail script - not including form values in sent email -

i have php mail script gets triggered following. var theform = document.getelementbyid( 'mailinglist-form' ); new stepsform( theform, { onsubmit : function( form ) { var messageel = $('.final-message'); // hide form $('.simform-inner').addclass('hide' ); //remove cursor $('#q2').blur(); //get input field values data sent server post_data = { 'user_name' : $('input[name=name]').val(), 'user_email' : $('input[name=email]').val() }; //ajax post data server $.post('mail.php', post_data, function(response){ if(response.type == 'error'){ //load json data server , output message messageel.html('sorry, please try again later.'); $(messageel).addclass( 'show' ); }else{ messageel.html(response.text); $(messageel).ad

google action script (Spreadsheet) clear(options) method of Range class not working as expected -

pulling data spreadsheet display via google visualization date-time objects raising error:"the script completed returned value not supported return type" generated. i found after manual conversion of date-time "plain text" format, worked fine. the range class has clear method should able remove formatting instead clearing contents cells. clear({formatonly:true}) snippet: var sheetid = '1k1p0snweftgvbih4vxbflkayehdrrepmbosyqnm_oxc_we'; var sheet = spreadsheetapp.openbyid(sheetid).getsheets()[3]; //the timestamp object causes error when imported in g.a.s. next 4 lines of code removes formatting. var range = sheet.getrange("a1:a999"); range.clear({formatonly:true}); // remove formatting column range = sheet.getrange("e1:e999"); range.clear({formatonly:true}); // remove formatting column e var data = sheet.getdatarange().getvalues(); can please clarify , assist solution? .clearformat() or .clea

Error building on VSO / Azure - Typescript compiler not found -

since yesterday keep getting error when trying build on hosted vso (azure )with standard buildcontroller: c:\program files (x86)\msbuild\microsoft\visualstudio\v11.0\typescript\microsoft.typescript.targets (87, 0) project file uses different version of typescript compiler , tools installed on machine. no compiler found @ c:\program files (x86)\microsoft sdks\typescript\1.5\tsc.exe. may able fix problem changing element in project file. we using visual studio 2013 , typescript 1.5. i can reproduce issue , have submitted feedback on microsoft connect page, refer link details: https://connect.microsoft.com/visualstudio/feedback/details/2292339 for now, can use vnext build system build project workaround, build can completed successfully. or copy required files microsoft.typescript.targets source control folder , change path references in csproj file folder mentioned in article: http://typescript.codeplex.com/workitem/1518 . in case, build works on hosted build contro

PHP - translating an array to a map of arrays -

i have array of objects - results of query. it looks this: j - number of rows returned table result[j]->date, result[j]->user, result[j]->count the pk of table date+user, meaning can have rows: 1.1.2016 user1 5 1.1.2016 user2 8 5.1.2016 user1 4 for purpose need create map have number of elements = number of different dates in previous array, that: map[j=datex] -> array consist of pairs (user+count) many have have date. meaning on date 1.1.2016 have 2 objects - (user1, 5) , (user2, 8) , on date 5.1.2016 1 pair (user1, 4) there structure in php can me create "map" there in java example? use array_map . iterate on every object in array , add them new array same key (date). results objects same date in 1 array . $map = array(); // new mapped array array_map(function($obj) use (&$map){ $map[$obj->date][] = $obj; }, $arr); test $obj1 = new stdclass(); $obj1->date = '1.1.2016'; $obj1->user = 'user1';

R extract data frame from list without prefixes in column names -

i place data frame inside list. when try extract - column names prefixed list key data frame, there way extract data frame passed initially? cols<-c("column1", "column2", "column3") df1<-data.frame(matrix(ncol = 3, nrow = 1)) colnames(df1)<-cols df1 result<-list() result['df1']<-list(df1) newdf1<-as.data.frame(result['df1']) newdf1 get result (column names prefixed df1): > cols<-c("column1", "column2", "column3") > df1<-data.frame(matrix(ncol = 3, nrow = 1)) > colnames(df1)<-cols > df1 column1 column2 column3 1 na na na > > result<-list() > result['df1']<-list(df1) > > newdf1<-as.data.frame(result['df1']) > newdf1 df1.column1 df1.column2 df1.column3 1 na na na of course, can remove prefixes manually, there proper way this. thanks! extract using [[ rather [ :

javascript - Clearing JS response -

i making call api. api returns list of results. when - response fed object use iterate through , display them. here function that: var getavailability = () => { if (chosendata.hotel == "") { showerror("please select location before booking."); $timeout(() => ltbnavservice.settab('location'), 50); return; } searchresponse = {}; console.log(searchresponse); webapi.gethotelavailability(gensearchobject()).then((data) => { searchresponse = data; $timeout(() => $('[data-tab-content] .search-btn').first().focus(), 50); generateroomtypeobject(searchresponse); }, (data) => searchresponse.error = data.data.errors[0].error); }; the problem: old results still displayed until new set of results available. causes flicker , delay bad user experience. the solution:(which need with) best possible way of handling

typoscript - TYPO3 bootstrap_package and custom page title -

i have 1 problem. need setup custom title tag (it must breadcrumb <title> first level page, second level page) in typo3 installation. in old website using code: #navpath in title tag config.nopagetitle = 2 page.headerdata.11 =hmenu page.headerdata.11.special = rootline page.headerdata.11.1 = tmenu page.headerdata.11.1.wrap =<title>&nbsp;|&nbsp;- &nbsp;narty.pl</title> page.headerdata.11.1 { no { allwrap = |,&nbsp; |*||*| | donotlinkit = 1 } } how implement use pagetitle variable in bootstrap_package typo3 version: 6.2 your code snippet right. have add page.10.variables.pagetitle > this removes typoscript configuration pagetitle.

javascript - Swapping images and captions at same time -

i have image gallery trying make far works fine. problem no matter how try, cannot each image have own caption when swap them out using javascript. before gets upset me question, have looked on here , found how people add captions using html when swap images taht wont work. thought maybe create empty div , insert html text using javascript, how can caption load matches appropriate pic? array option here? here page in question. my site i leave "photo" div empty image can load it. far works. confused on captioning. here javascript code $('#gallery img').each(function(i) { var imgfile = $(this).attr('src'); var preloadimage = new image(); var imgext = /(\.\w{3,4}$)/; preloadimage.src = imgfile.replace(imgext,'_h$1'); $(this).hover( function() { $(this).attr('src', preloadimage.src); }, function () { var currentsource=$(this).attr('src'); $(this).attr('

asp.net mvc - Cloudserver Auzre cdn not caching bundles -

i have configured cloud service , azure cdn based on below article, bundles not getting cached in client site. every time loading server. have set querystring caching behavior cache every unique url https://azure.microsoft.com/en-in/documentation/articles/cdn-cloud-service-with-cdn/ access-control-allow-origin:* cache-control:no-cache content-length:6350 content-type:text/css; charset=utf-8 date:wed, 27 jan 2016 09:05:57 gmt expires:-1 pragma:no-cache server:microsoft-iis/8.5 x-aspnet-version:4.0.30319 x-powered-by:asp.net this because cache-control: no-cache header preventing files being cached on cdn. can verify checking if same header being returned when directly access file origin.

node.js - Default values in array mongoose -

i trying make default values array in mogoose schema: warning: type: array default: [10, 50, 99] am right in such decision or there other way this? regarding mongoose-documentation, way correct. here small example: var arraytestschema = new schema({ anarray: { type: array, 'default': [1, 2, 3] } }); and link related documentation page: http://mongoosejs.com/docs/2.7.x/docs/defaults.html

what is the meaning of FOOBAR=foobar followed by a shell command? -

i see in shell scripts variable assignment followed (without semicolon) command. meaning of that? not seem affect command, , not seem affect next command way normal assignment would: >echo $foobar >foobar=1 echo $foobar >echo $foobar > so, does do? it sets environment variable value process. here, step step , happens: original command: foobar=1 echo $foobar shell performs substitution: command foobar=1 echo shell fork(2) s new process environment variable created in new process: command echo (with $foobar equal 1 ) new process exec(3) ed: \n output new process exits , reaped shell at no point parent process see assigned value of $foobar .

java - Display a pivot table on jsp -

Image
i'm writing webapp there pivoted data has displayed in jsp table. query works fine in sql server. i'm unable understand how project same on jsp. there 2 datepickers in jsp. when select 1 or both, table full data(based on date ranges) has displayed, if there no date selected, need pivoted data table displayed. below codes. table.jsp <html> <head> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script> <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> </head> <body> <marquee> <h1>this example of ajax</h1> </marquee> <p> date: <input type="text" id="startdatepicker"> </p> <p>

javascript - why Object.getOwnPropertyNames for a DOM returns empty array? -

in following simplest html snippet: <button class="clickme" id="clickme">click me</button> i use following javascript code query dom , want inspect properties , methods on objects returned getelementbyid: var btn=document.getelementbyid('clickme');console.log(object.getownpropertynames(btn)); my question is: 1. why above log dumps out [] empty string?? 2. type of returned value getelementbyid? thanks~! why above log dumps out [] empty string all properties of object (element) inherited node, , own parent, eventtarget, , implements of parentnode, childnode, nondocumenttypechildnode, , animatable. since has no direct property of own, returns empty array. what type of returned value getelementbyid? it returns element .

ios - UIView in UINavigationItem doesn't respond to touches -

so, have uinavigationcontroller embedded in uitabcarcontroller @ index 1 . on viewcontroller add uisearchbar uinavigationitem . so, works expected. however, need navigate new viewcontroller navigates new instance of embedded vc. the flow looks this: vc 1 -> vc2 -> v1(new instance) so, vc1 has uinavigationcontroller embedded in it. now, issue uiview added uinavigationitem not respond touches anymore, yet visible. i've figured has view heir-achy . what have tried: removing , reading uisearchbar each time vc1 's viewwill/did disappear methods called. adding uisearchbar subview on uinavigationbar only. setting uisearchbar using self.parentviewcontroller... bringing uisearchbar front using uiview's bringsubviewstofront method. these either don't solve problem or present few 1 uisearchbar not appear @ all. if set uisearchbar part of uitableview 's headerview problem disappears falls outside of ui design requirements, not opt

angularjs - How to use orderBy for a property of an array of arrays in ng-repeat -

is there way order following example data set value property or specific array index?: var rows = [ [ { value: 'hello', label: 'world' }, { value: 'hello1', label: 'world1' }, { value: 'hello2', label: 'world2' } ], [ { value: 'asd', label: 'jkl' }, { value: 'asd1', label: 'jkl1' }, { value: 'asd2', label: 'jkl2' } ] ]; i tried repeat statement: ng-repeat="row in rows | orderby:'-[1].value'" it's not throwing error doesn't ordering. change ng-repeat this. order rows values of first column. this represents row. ng-repeat="row in rows | orderby:'this[0].value'"

python - Raspberry Pi, ON turns the GPIO output off? -

for reason i'm having problems turning on , off outputs programs. if use following output turns on / off correctly import rpi.gpio gpio gpio.setmode(gpio.bcm) gpio.setup(2, gpio.out) gpio.output(2, 1) time.sleep(2) gpio.output(2, 0) but reason fish tank lighting program gpio.output(2, 0) (or false) turns relay on!? , same inverse here program have called output incorrectly? # lighting program --- import rpi.gpio gpio import datetime import time gpio.setmode(gpio.bcm) gpio.setup(2, gpio.out) # lights #declair lighting on/off times on_time_monday = open("monday_on.txt", 'r').read() off_time_monday = open("monday_off.txt", 'r').read() on_time_tuesday = open("tuesday_on.txt", 'r').read() off_time_tuesday = open("tuesday_off.txt", 'r').read() on_time_wednesday = open("wednesday_on.txt", 'r').read() off_time_wednesday = open("wednesday_off.txt", 'r').read

java - Speed up android DES encryption/decryption -

i've got encrypt , decrypt file on android. this, wrote following class: package blabla.fileencrypter; import alotofclasses; /** * fileencoder class provides interface allow easy encrypting , decrypting of files. use class, first call both {@link #setsalts(string, string)} , {@link #setfolders(string, string)}. * @author daniël van den berg * @since nov 26, 2015 * */ public class fileencrypter { private static string encryptedfolder = ""; private static string decryptedfolder = ""; private static byte[] salt = null; private static ivparameterspec iv = null; private static string encryptedpostfix = ""; /** * sets folders documents have placed in. * @param encryptedfolder folder encrypted files have placed in. * @param decryptedfolder folder decrypted files have placed in. */ public static void setfolders(string encryptedfolder, string decryptedfolder){ fileencrypter.encryptedfolder =

javascript - Passing an array of ints with node-soap -

i'm using node-soap service , works need send array of ints , find can send first 1 because can't find correct way build js object represent array. i've been looking @ similar questions couldn't find answer question. i need generate xml property following one: <ns1:arrayofints> <!--zero or more repetitions:--> <arr:int>2904</arr:int> <arr:int>3089</arr:int> <arr:int>4531</arr:int> </ns1:arrayofints> by passing object contains array: soapobject = { somefields, "ns1:arrayofints": { goes here }, }; any idea how create js object? i had same problem , used $xml property add raw xml request , attributes set arr namespace: var fields = [2904, 3089, 4531]; soapobject.arrayofints = { attributes: { 'xmlns:arr': 'http://schemas.microsoft.com/2003/10/ser

php - I want to skip 1st row of excel file and print from 2nd row onwards -

i fetching data excel sheet , putting in table. but requirement is, want take data 2nd row onwards , 1st row header user submitting data. please help. with code have, able fetch data 1st row onwards. $html="<table border='1'>"; for($i=0;$i<count($data->sheets);$i++) // loop sheets in file. { if(count($data->sheets[$i][cells])>0) // checking sheet not empty { //echo "sheet $i:<br /><br />total rows in sheet $i ".count($data->sheets[$i][cells])."<br />"; for($j=1;$j<=count($data->sheets[$i][cells]);$j++) // loop used each row of sheet { $html.="<tr>"; for($k=1;$k<=count($data->sheets[$i][cells][$j]);$k++) // loop created data in table format. { $html.="<td>"; $html.=$data->sheets[$i][cells][$j][$k]; $html.="</td>";

oracle - I am incrementing the value and update it to the table -

create or replace trigger trans_s_t5 after insert on trans_s each row begin update :old.no_of_books set book_no=:old.no_of_books+1 book_no=:trans_s.book_no; end; getting error as: pls-00049: bad bind variable 'old.no_of_books' compilation failed, line 3 pls-00049: bad bind variable 'old.no_of_books' compilation failed, line 4 pls-00049: bad bind variable 'trans_s.book_no' compilation failed, line 2 pl/sql: ora-00903: invalid table name compilation failed, line 2 (10:11:17) pl/sql: sql statement ignored it appears you're trying change value of field in trans_s table in trigger, defined on trans_s table. if so, can changing trigger before trigger , updating field directly, in: create or replace trigger trans_s_t5 before insert on trans_s each row begin :new.no_of_books := :new.no_of_books + 1; end; best of luck.

html - Polaroid Tiles For Navbar -

2 questions,so want create navbar,i found example on net.the way code when add more li's wrap second line why?. main question - want add more li's navbar, it's using nth-child target each li style,i want changed each li has specific class can add more li's , style each way,and not use nth-child.i tried , couldn't them style way before code changes,they instead line up. ps: why wrapper doing in editor, on editor , browser is working expected. body{ margin: 0px; } #wrapper{ background-color: #ffffff; height: 100%; margin-left:auto; margin-right:auto; padding: 30px; width:940px; border: 15px solid #b4d8e7; border-radius: 10px; } /*---2 column-right layout----------------------*/ .layout-two-column-right #alpha { width: 650px; } .layout-two-column-right #beta { width: 310px; } ul.polaroids-menu { width: 280px; margin: 30px 0 18px -55px; list-style-type: none; } ul.polaroids-menu a, ul.polaroids-menu a:hove

ibm bluemix - error 500 while creating an instance of blazemeter service -

i want load performance test of 1 of application , trying explore blazemeter service same, while creating instance of service, got following error. service broker error: {"description"=>"error 500 received broker url https://bluemix.marketplace.ibmcloud.com/api/custom/cloudfoundry/v2/service_instances/f9ab4891-835f-402a-9a56-98dc1f8a553a "} my understanding of error either service down or there issue between network connection of service provider , bluemix. guess. if know how can resolve issue, let me know ? thanks manoj this issue caused when bluemix isn't able contact "create service" endpoint on broker api. it's either temporarily down on blazemeters end , fixed shortly. in meantime seems can still use blazemeter directly their website

Python - MySql query for ip address within cidr range -

ok need little bump here. have mysql database, within db, have table ip address stored inet_aton. have ip cidr ranges in table. such 192.168.0.0/24 or /8 etc. i'm using python query db see if single /32 ip address in db. i'm trying code this: def ip_in_networks(ip, networks): found_net_type = '' found_template = '' ip_as_int = unpack('!i', inet_aton(ip))[0] (network, netmask, net_type, template) in networks: if (ip_as_int & netmask) == network: # are, awesome found_net_type = net_type found_template = template break def fetch_networks(r_conn): '''this returns list of networks [[network, netmask], ...]''' nets = [] r_cur = r_conn.cursor() sql = 'select n.network, n.netmask, l.lookup_value, l.template ' sql += 'from network n, lookup l ' sql += 'where n.network_type_id = l.id' r_cur.execute(sq

sql - SAS FedSQL - regular expression -

i'm trying use regular expression inside sas data flux client, uses fed sql. code this: select * dataset char_value "icm[def].*" in order match records char_value = icmd... or icme... or icmf... . doesn't seem understand regex, in fact returns 0 rows.can me? after looking online sas synatax, saw not using correct syntax. like operator should singlee quotes if matching string, , use % not * so: select * dataset char_value 'icm[def]%' its untested, tell me if works(i'm not familiar [] if doesn't work can try 'icmd.%' or 'icme.%'....) select * dateset char_value 'icmd%' or char_value 'icme%' or char_value 'icmf%'

javascript - Kendo ui grid command template click link to function -

how make click event of template? not going function. command: [{ name: "openmovemodal", template: "<a class='k-grid-decreaseindent k-button'><span class='fa fa-arrows'></span></a>", click: openmovemodal } function function openmovemodal(e) { e.preventdefault(); var dataitem = this.dataitem($(e.currenttarget).closest("tr")); } assign onclick event template. template: "<a class='k-grid-decreaseindent k-button' onclick='openmovemodal($(this))' ><span class='fa fa-arrows'></span></a>" here small dojo example

java - Removing JSON elements with jackson -

i've particular json node corresponds import org.codehaus.jackson.jsonnode, , not import org.codehaus.jackson.map.jsonnode. [ { "givenname": "jim", "formattedname": "jimjackson", "familyname": null, "middlename": "none", "honorificprefix": "mr", "honorificsuffix": "none" }, { "givenname": "john", "formattedname": "johnlasher", "familyname": null, "middlename": "none", "honorificprefix": "mr", "honorificsuffix": "none" }, { "givenname": "carlos", "formattedname": "carlosaddner", "familyname": null, "middlename": "none", "honorifipref