Posts

Showing posts from May, 2010

php - Should table names be prefixed with the database name and period when using MySQL/PDO? -

the vast majority of queries i've seen have database name followed period before table name. example: select * mydatabase.mytable; however, seems work well: select * mytable; is there reason have mydatabase. before each table name? i using mysql via pdo in php. is there reason have mydatabase. before each table name yes, if performing cross database query ; accessing , joining tables different database. example below db1 , db2 different databases. select t1.*,t2.some_column db1.table1 t1 inner join db2.table2 t2 on t1.some_id_column = t2.some_id_column; but if accessing tables same database , running query against database no need specifying qualified name ( db_name.schema_name.table_name )

scala - SBT Output for Kind Type -

with respect type theory, field of mathematics , computer science both tend use same notation kinds , kinds construction, namely symbols: * -> haskell adopts notation: prelude> :k maybe maybe :: * -> * but in sbt , get: scala> :k option scala.option's kind f[+a] the haskell way easier understand directly matches literature on type theory. why did sbt not use * , -> notation? information can see being imparted sbt way type variance. try verbose flag (-v) scala> :k -v option scala.option's kind f[+a] * -(+)-> * type constructor: 1st-order-kinded type. some more info: http://docs.scala-lang.org/scala/2.11/ (ctrl+f :kind) https://github.com/scala/scala/pull/2340

Erro convert Hex to Ascii Javascript -

i receive binary file (biometric template) , must convert hexadecimal caracter ascii caracter. hexadecimal caracter programm not convert, hex = 95. what wrong? must program convert every ? bellow code: var campo = document.getelementbyid('fileinput'); var hex = campo.tostring(); var str = ''; (var = 0; < prm.length; += 2) str += string.fromcharcode(parseint(prm.substr(i, 2), 16)); you don't specify mean "do not convert". if meant decimal 95, there ascii character not printable (nak). there no ascii character hex 0x95 because ascii 7-bit encoding (0-0x7f). , javascript strings not ascii, they're ucs-2. https://mathiasbynens.be/notes/javascript-encoding

excel - How to insert a date (based on a cell reference) in file Title? -

i have macro saves excel file pdf, insert date within saved file name based on particular cell reference in workbook in "yyyy-mm-dd" date format. the specific sheet in workbook want reference titled "variables , macros"; particular cell contains date cell b4 within sheet. the current recorded macro below: activesheet.exportasfixedformat type:=xltypepdf, filename:= _ "z:\regional weekly report\11 may\forecast template\fiscal 2015 weekly projections 2015-05-24.pdf" _ i ideally keep section static: z:\regional weekly report\11 may\forecast template\fiscal 2015 weekly projections , add cell reference date after; such & text('variables , macros'!b4,"yyyy-mm-dd" . i've looked @ similar posts (i.e. adding range("b4").value ) nothing seems working, i'm missing something. you try this excel 2010 sub saveas() dim savepath string dim saveas...

php - Rails get time in HH:MM AM/PM -

i have php code converting time hh:mm format date("g:i a", strtotime('2000-01-01 07:00:00 utc') i want convert same function in rails. i tried datetime.parse('2000-01-01 07:00:00 utc').strftime("%i:%m %p") which showing error : no implicit conversion of time string i eproduced error : datetime.parse(time.now).strftime("%i:%m %p") # typeerror: no implicit conversion of time string this because parse methods accept string objects, not other objects. time object in case. have : datetime.parse(time_object.to_s).strftime("%i:%m %p") # or directly time_object.strftime("%i:%m %p")

javascript - What is the best way to access an element through a data-attribute whose value is an object (JSON)? -

say have following element: <div class='selector' data-object='{"primary_key":123, "foreign_key":456}'></div> if run following, can see object in console. console.log($('.selector').data('object')); i can access data other object. console.log($('selector').data('object').primary_key); //returns 123 is there way select element based on data in attribute? following not work. $('.selector[data-object.foreign_key=456]'); i can loop on instances of selector var foreign_key = 456; $('.selector').each(function () { if ($(this).data('object').foreign_key == foreign_key) { // } }); but seems inefficient. there better way this? loop slower using selector? you can try the contains selector : var key_var = 456; $(".selector[data-object*='foreign_key:" + key_var + "']"); i think may gain little speed here on loop in examp...

Button sends you to NavigationDrawerFragment activity using android studio -

i trying link button activity second activity navigationdrawerfragment. it's not working me. this code executed when button clicked: public void onclicklistener(){ button gotosaying=(button)findviewbyid(r.id.button); gotosaying.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { intent intent = new intent(getapplicationcontext(),mainactivity2activity.class); startactivity(intent); } }); when create new navigationdrawerfragment activity, creating 2 actions (navigationdrawerfragment) , (mainactivity2activity) automatically. in code trying call (mainactivity2activity) main activity drawer. there lot of errors appearing. have tried code call simple activity , working, drawer don't know problem. please me.

ms access - Form - Create new record in *different* table based on current form data -

i'm building risk , issues tracker , have become stuck after initial progress. i'll explain setup now. tables a table containing open projects a table containing open risks , issues relationships a one-to-many relationship between project id (primary key in project table) risks , issues table queries a query filter results projects table have been selected in combo box forms one form containing combobox allows user select project. there text box, populated based on selected project. text box populated using dlookup on above query, , have chosen field populated that. works fine. i able select project , see little information using above set up. next step me able add risk or issue. what happen have create risk / issue button, pull across project id (primary key) selected project, , add new record in **risks , issues* table. need add in additional information risk, dates, owner etc. also, having project primary key tied each risk, should able ...

sql server - C# database syncing application identification issue -

i'm trying sync data between sql server , sqlite (where structure of databases match) within c# application. the app has ability update, add, remove information, , handheld (motorola rfidreader), either-or could've have possibly updated information, , application won't know until syncing begins. my issues knowing row within database has been added/removed/ or updated. have history table keeps track of when crud operations occur, unique identifiers within each database auto-incremented id column. the problem is, if i've added row on handheld, , try sync 2 databases, , add row on server well, id values (probably) off. means can't search id , expect 100% of time id correctly matches both databases. mismatched id's between databases throw off remove , update functions well, since don't know if i'm working on right row item. how can sync these 2 databases , keep ids intact? the solution i've come far (and i'm not convinced best option) h...

c# - how to reoder the xml -

workign on xml reorder xml follows: <subjects> <subject> <name></name> <height></height> <addresss> <address> <city>ab</city> </address> </addresses> </subject> <subject> <name></name> <height></height> <addresss> <address> <city>cd</city> </address> </addresses> </subject> </subjects> now want creat xml follows adding address reference subject <order> <subjects> <subject> <name></name> <height></height> <address ref="a1"/> </subject> <subject> <name></name> <height></height> <address ref="a2"/> </subject> </subjects> <addresss> <ad...

html - Unexplained Gap Between <header> and <main> -

i can not seem rid of space exists between header , main content. see black background above background image , below navigation. great. <!doctype html> <html> <head> <meta charset="utf-8"> <title>awesome landing page</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <header> <div id="header-container"> <div class="col-3"> <img class="logo" src="images/logo-dark.png" height="18" width="143"> </div> <div class="col-3"> <nav> <ul class="menu"> <li>home</li> <li>features</li> <li>about</li> <li>signup...

html - Css3 Transition dont work on ios -

on pc , android devices transition code work on ios devices not work. im use html , css. /***** box 3 *****/ #box3 { height:240px; width:198px; border:1px solid #dedede; background-color:#fcfcfc; position:relative; overflow:hidden; float:left; margin-right:23px; margin-bottom:23px; opacity:1; -webkit-transition: opacity .2s ease-out; -moz-transition: opacity .2s ease-out; -o-transition: opacity .2s ease-out; -ms-transition: opacity .2s ease-out; transition: opacity .2s ease-out; } #box3:hover { -webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999; } #box3 .bgbox3 { background:url(images/top-seller-3.jpg) 50% 10% no-repeat; position:absolute; height:240px; width:198px; opacity:1; -webkit-transition: .2s ease-out-in; -moz-transition: .2s ease-in-out; -o-transition: .2s ease-in-out; -ms-transition: .2s ease-in-out; transition: .2s ease-in-out; } #box3:hover .bgbox3 { opacity:0.3; } #box3 a, #box3 a:hover { text-decoration: none; } .imagebox3...

Compute MD5 digest of file in Haskell -

using haskell, how can compute md5 digest of file without using external tools md5sum ? note: question intentionally shows no effort answered right away. one option use puremd5 package, example if want compute hash of file foo.txt : import qualified data.bytestring.lazy lb import data.digest.pure.md5 main :: io () main = filecontent <- lb.readfile "foo.txt" let md5digest = md5 filecontent print md5digest this code prints the same md5 sum md5sum foo.txt . if prefer one-liner, can use 1 (the imports same above): lb.readfile "foo.txt" >>= print . md5

How do I write a Scala unit test to verify that a function is called with some particular function as a parameter? -

i have class: class somedao { this: support => def get(id:long): option[somedto] = { support.sproccall(somedto.fromresultset, somedao.getsproc, id) } } somedto.fromresultset function1 [wrapperresultset, somedto]. is possible verify support.sproccall has been called correct function first parameter? you're treading close problem of determining if 2 functions equal. particular problem has been covered many times on so, such how compare scala function values equality believe question less general form of question. if so, answer can't reasons founded in theory.

vsts - TFS online error TF50316 when connection to server -

project 2010, "converted" 2013. uploaded tfs online. receive following error when attempting pull down via source control explorer or when attempting add new items source control when opened locally: --------------------------- microsoft visual studio --------------------------- visual studio tf50316: following name not valid: app_browsers. verify name not exceed maximum character limit, contains valid characters, , not reserved name. --------------------------- ok --------------------------- i'm stumped. suggestions? in particular instance, turns out workspace corrupted. deleting workspace, creating new local copy of repo, connecting online repo via new workspace corrected problem. creating new workspace linking original copy of local repo/code did not exhibit same problem.

c# - syntax error missing operator in query expression -

when run below query, syntax error in query expression. private void button8_click(object sender, eventargs e) { connection.open(); oledbcommand command = new oledbcommand(); command.connection = connection; string query1 = "update points set pnts = (case when empname = '" + combobox1.text + "' '" + label15.text + "' when empname = '" + combobox2.text + "' '" + label16.text + "' when empname = '" + combobox3.text + "' '" + label17.text + "' end) empname in ('" + combobox1.text + "', '" + combobox2.text + "', '" + combobox3.text + "')"; command.commandtext = query1; command.executenonquery(); connection.close(); } the error is: syntax ...

c++ - Mapping a vector of one type to another using lambda -

i have bit of code looks like b convert(const a& a) { b b; // implementation omitted. return b; } vector<b> convert(const vector<a>& to_convert) { vector<b> ret; (const a& : to_convert) { ret.push_back(convert(a)); } retun ret; } i trying rewrite using lambdas code not more concise or more clear @ all: vector<b> convert(const vector<a>& to_convert) { vector<b> ret; std::transform(to_convert.begin(), to_convert.end(), std::back_inserter(ret), [](const a& a) -> b { return convert(a); }); retun ret; } what like: vector<b> convert(const vector<a>& to_convert) { return map(to_convert, [](const a& a) -> b { return convert(a); }); } where map functional style map function implemented as: template<typename t1, typename t2> vector<t2> map(const vector<t1>& to_convert, std::functi...

trap exceptions comprehensively in Jython -

this attempt far trap exceptions in jython code. difficult thing, find, trapping exceptions when override method java class: "vigil" decorator below (which tests whether edt/event despatch thread status correct) can find out first line code thrown... can identify method itself. not line. furthermore, tracing stack frames through python , java stacks beyond me. there seem these layers , layers of "proxy" classes, no doubt inevitable part of jython mechanics. it'd great if cleverer me take interest in question! nb example of how use "vigil" decorator: class columncellrenderer( javax.swing.table.defaulttablecellrenderer ): @vigil( true ) # means check done thread edt, intercepting python exceptions , java throwables... def gettablecellrenderercomponent( self, table, value, isselected, hasfocus, row, column): super_comp = self.super__gettablecellrenderercomponent( table, value, isselected, hasfocus, row, column...

ios - How to use PHCachingImageManager -

Image
i know there question on so, don't think given answer satisfying/complete: how can ios photos app can show hundreds of photos in 1 screen? what want achieve i want image selection in whatsapp (ios) (see screenshot). when open camera, there horizontal slider can see images gallery. what tried right have following code in appdelegate: let options = phfetchoptions() options.sortdescriptors = [ nssortdescriptor(key: "creationdate", ascending: true) ] if let results = phasset.fetchassetswithmediatype(.image, options: options) { results.enumerateobjectsusingblock { (object, idx, _) in if let asset = object as? phasset { variables.assets.append(asset) } } println(variables.assets.count) variables.imagemanager.startcachingimagesforassets(variables.assets, targetsize: cgsizemake(viewwidth, viewwidth), contentmode: .aspectfill, options: self.requestoptions) } later load images in uitableviewcontroller , call foll...

Concatenate two double arrays into a n x 1 cell array using matlab -

i have n x 1 double array. a = [1234; 1235; 1236; 1237; 1238]; and double scalar. b = [4567] i want combine (concatenate) these make n x 1 cell array looks this, c = [1234 4567; 1235 4567; 1236 4567; 1237 4567; 1238 4567]; try one-liner: out = mat2cell([a,repmat(b,numel(a),1)],ones(numel(a),1),2) sample run: a = [1234; 1235; 1236; 1237; 1238]; b = [4567]; results: out = [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double] if want 1xn cells, transpose output out = out.' %//' out = [1x2 double] [1x2 double] [1x2 double] [1x2 double] [1x2 double]

dojo - how to obtain a resizable dijit dialog -

in dojo intend use dialog box resizable dragging mouse on rightmost corner edge. dialog such has no property resize it. try use floating pane , add dialog child. plan use resizable property of floating pane child i.e dialog. approach wrong ? d = new dialog({ title: "testing dialog", content: "hi" }); fp = new floatingpane({ title: "test", resizable: true, dockable: false, style: "position:absolute;top:0;left:0;width:100px;height:100px;visibility:hidden;", id: "fp" }, dojo.byid("fp")); fp.addchild(d); fp.startup(); it depends on aspect of dialog you're trying replicate floatingpane. if, instance want default action pane and/or dialog overlay, perhaps it's better idea extend dialog , add resize handler floating pane has. if there more aspects of floating pane (e.g., moveable, resizeable, locked parent window)...

how to set width and height of sql command line output? -

i want see output in 1 line,i.e columns should side side. i have tried set pagesize 200,set linesize 200 didn't desired output in sql command line.how can fix it? if using windows command prompt left click on windows icon , click properties. set screen buffer size > width = 3000. persist setting same under defaults.

bash - expect fails when running proc inside proc -

my script works fine (retrieves sftp prompt) when using 1 proc. when try use proc inside proc, script gets stuck, , not know why. please not refactor code, not point, need understand issue here. working code: proc sftp_connect {} { set times 0; set connection_retry 2 set timeout 1; while { $times < $connection_retry } { spawn sftp ${sftp_user}@${sftp_server} expect { timeout { puts "connection timeout"; exit 1} default {exit 2} "*assword:*" { send "${sftp_password}\n"; expect { "sftp>" { puts "connected"; set times [ expr $times+1]; exp_continue} } } } } send "quit\r"; } sftp_connect debug output: expect: "\r\nsftp> " (spawn_id exp5) match glob pattern "sftp>"? yes but after moving send password separate proc, expect not retrieve sftp prompt anymore ("sftp>"): proc sftp_send_passwor...

c# - winforms Web Browser control Javascript issues -

we have winforms application has web browser control. invoke webpages gets rendered fine. if invoking javascript c# code behind of website, in script errors. eg: reponse.wirte("alert('hi');"); kindly help. i able resolve issue. script has registered page using "registerstartupscript" , call existing code. defined 1 javascript function called "alertmessage(msg)" , pass required value c# code behind thro' page.clientscript.registerstartupscript(this.gettype(), "displayfunction", "alertmessage('msg');", true);

php - How to browse files from projects google drive -

i have created project in google console service type credentials. have downloaded p12 key file, , wrote sample code inserting file test it: <?php require_once 'google-api-php-client/src/google_client.php'; require_once 'google-api-php-client/src/contrib/google_driveservice.php'; require_once "google-api-php-client/src/contrib/google_oauth2service.php"; $scopes = array('https://www.googleapis.com/auth/drive'); $accountemail = 'secret'; $accountp12filepath = './key.p12'; $key = file_get_contents($accountp12filepath); $auth = new google_assertioncredentials($accountemail, $scopes, $key); $client = new google_client(); $client->setuseobjects(true); $client->setassertioncredentials($auth); $service = new google_driveservice($client); $file = new google_drivefile(); $file->settitle('test title'); $file->setdescription('test description'); $parent = new google_parentreference(); $file->setparents(ar...

c# - WPF datagrid multi Tier Header, editing cells -

so have multi tier header, header 2 sub headers underneath it, code of header is: <style x:key="platedetailsmultitier" targettype="datagridcolumnheader" basedon="{staticresource datagridheaderstylebase2tier}"> <setter property="template"> <setter.value> <controltemplate> <grid x:name="root" verticalalignment="top" horizontalalignment="stretch" height="49" margin="0,0,0,0"> <grid.columndefinitions> <columndefinition/> <columndefinition width="auto"/> </grid.columndefinitions> <grid> <grid.rowdefinitions> <rowdefinition height="24" /> <rowdefinition height="1" /...

java swing, get value from ActionListener -

i wanted click on button , have pop window can enter string , string outputted in label, can't manage return string. jbutton btnname = new jbutton("name"); btnname.addactionlistener(new actionlistener() { string name; public void actionperformed(actionevent e) { name = joptionpane.showinputdialog("enter name"); } }); btnname.setbounds(10, 11, 89, 23); frame.getcontentpane().add(btnname); jlabel lblperson = new jlabel(name); lblperson.setfont(new font("tahoma", font.plain, 36)); lblperson.setbounds(10, 188, 414, 63); frame.getcontentpane().add(lblperson);` i don't know how return string name actionlistener class have error @ line 10. just use jlabel.settext public void actionperformed(actionevent e) { name = joptionpane.showinputdialog("enter name"); lblperson.settext(name); } another way can creating (abstract)action inner ...

Invlid_grant When trying to refresh token - Google Oauth - PHP -

just started using google admin sdk,trying retrieve specific user's infomation. keep getting same error on , over [29-may-2015 14:41:18 africa/tunis] php fatal error: uncaught exception 'google_auth_exception' message 'error refreshing oauth2 token, message: '{ "error" : "invalid_grant" during research found it's syncing problem(server time) web app hosted on third party server.checked service account credentials ps: don't know if matters server's time zone gmt+1 ` <?php require 'src/google/autoload.php'; session_start(); $timestamp = $_server['request_time']; echo gmdate("y-m-d\th:i:s\z", $timestamp); $service_account_name = "xx"; $key_file_location = "yyy.p12"; $client = new google_client(); $client->setapplicationname("members"); $directory = new google_service_directory($client); if (isset($_session['service_token']) && $_session[...

c# - Insert query inside for loop not working correctly -

i working on asp .net project. have page generating random coupon keys. user enters quantity , generate. so did, put loop according quantity , inside loop created random key , search key in db (key unique) , insert data in db. code: for (int = 0; < quantity; i++) { { couponkey = generatekey(); } while (!searchepinkey(couponkey)); conn = new sqlconnection(connstring); conn.open(); using (sqlcommand cmd = new sqlcommand()) { cmd.connection = conn; cmd.commandtype = commandtype.text; string query = "insert couponstock (coupon_key, status, created_on)"; query += "values('" + couponkey + "','unused', getdate())"; cmd.commandtext = query; cmd.executenonquery(); } conn.close(); } inside loop, flow like: -genrate random key -search if random key exists or not in db -if found similar again generate random key -insert data in db so when run page smaller q...

how scala treat companion object? -

i'm new scala java background. in java when want share field among different objects of class. declare field static . class car { static no_of_tyres = 4; // implementation. public int getcarnooftyres(){ no_of_tyres; // although it's not practice use static without class name //but can directly access static member in same class . } } but in scala cannot declare static fields in class , need use object (companion object) that. in scala this, class car { println(no_of_tyres); // scala doesn't let that. gives error println(car.no_of_tyres);// correct way. } object car { val no_of_tyres: int = 4; } i'm curious, how scala treat companion objects? different these 2 key-words ( class , object ) makes ? why scala not letting access no_of_tyres directly in class? i'd reference answer same subject: what advantages of scala's companion objects vs static methods? see section 4.3 of odersky's...

mysql - GROUP BY resulting in undesirable results -

in following query i'm pulling list of applicants on specific job. no matter group by, either gives me same user each different application data or 4 rows returned each. i've begun relational database design i'm assuming set wrong. split applicants , applications , i'm struggling grouping data. unless need subquery, group_concat, or using group incorrectly? select applicants.*, applications.*, users.* applicants inner join applications on applicants.job_id = applications.job_id inner join users on applicants.user_id = users.user_id applicants.job_id = 56 , applicants.process_level = 1 group applications.app_id table: applicants +-----+--------+---------+--------+--------------------+---------------+ | id | job_id | user_id | app_id | applied_on | process_level | +-----+--------+---------+--------+--------------------+---------------+ | 1 | 56 | 125 | 5 |2015-05-24 19:28:55 | 1 | | 2 | 22 | 15 |...

YouTube Data API (v3) : Does Google OAuth2 authorization for YouTube uploads retrieval? -

does google oauth2 authorization necessary retrieve youtube channel uploads using youtube data api (v3) ? oauth 2.0 protocol required authorizing access private user data.so oauth2 authorization necessary upload on youtube using youtube data api

javascript - Chinese Characters Lost in Excel -

i have comprised following functions take table data , export excel sheet form various internet sources. works great english characters when table contains chinese letters excel document shows random chars , not chinese. have encoding in excel v. page? how can fix this? function exporttoexcel(table, name) { var uri = 'data:application/vnd.ms-excel;base64,';//application/vnd.openxmlformats-officedocument.spreadsheetml.sheet var template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/tr/rec-html40"><head><!--[if gte mso 9]><xml><x:excelworkbook><x:excelworksheets><x:excelworksheet><x:name>{worksheet}</x:name><x:worksheetoptions><x:displaygridlines/></x:worksheetoptions></x:excelworksheet></x:excelworksheets></x:excelworkbook></xml><![endif]-->...

java - How to retrieve and remove embedded document spring data mongodb -

there stuck, how remove embedded document in mongodb. using spring data mongodb criteria, doing following: // database "_id" : objectid("55683d51e4b0b6050c5b0db7"), "_class" : "com.samepinch.domain.metadata.metadata", "preferencetype" : "shopping", "subtypes" : [ { "_id" : objectid("55683d51e4b0b6050c5b0db6"), "leftvalue" : "veg", "rightvalue" : "non_veg", "preferencepoint" : 0 } ], "createddate" : isodate("2015-05-29t10:20:01.610z"), "updateddate" : isodate("2015-05-29t10:20:01.610z") // query mongotemplate.updatemulti(new query(), new update().pull("subtypes", query.query(criteria.where("subtypes._id").is(new objectid("55683d51e4b0b6050c5b0db6"))),metadata.class...

utf8 decode - Japanese text display from the webservice response -

i trying fetch japanese text api. the api responding japanese text if tested individually. however, when add in application, getting junk data instead of japanese text. i adding charset=utf-8 header. please me convert junk data proper japanese text. it may problem in way fetching text (if you're getting junk, may encoded already). you can try use similar utf8_decode in application (depending on language using) , sure use similar functions when performing operations in text.

javascript - Backbone: reverse string comparator -

backbone has nifty little comparator feature takes attribute name string , sorts it. need sort in descending order. var chapter = backbone.model; var chapters = new backbone.collection; chapters.comparator = 'title' // sorts title, ascending chapters.add(new chapter({page: 9, title: "the end"})); chapters.add(new chapter({page: 5, title: "the middle"})); chapters.add(new chapter({page: 1, title: "the beginning"})); console.log(chapters.pluck('title')); is there way without introducing comparator function? well, specifying .comparator delegates _.sortby docs specify calls _.property . no, can pass function (a _.pluck - between arguments in reverse order) suspect know this.

docusignapi - Docusign .NET Sdk Create document and get recipient view (Embed signing) (ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE) -

i'm trying create envelope , recipient url further processing. getting rest error "account_not_authorized_for_envelope". string recipientemail = "123@123.com"; string recipientname = "123"; string accountemail = "myuser@mydomain.com"; string accountpassword = "mypassword"; string documentpath = @"c:\users\...."; ; var account = new account(); account.email = accountemail; account.password = accountpassword; var result = account.login(); if (!result) return; var envelope = new envelope(); envelope.login = account; envelope.recipients = new recipients() { signers = new [] { new signer() { email = recipientemail, name = recipientname, recipientid = "1", ...

c# - Document method-summary with ambigious reference -

i have massively overloaded method methoda referenced summary-tag within documentation of methodb : /// <summary>a link <see cref="methoda" /></summary> void methodb { ... } the comment should not rely special overload of methoda of them. compiler prints ammessage cref-attribute ambigious (which intended). there best practices solve issue? thought of remove see -tag summary . maybe have other approaches? i think have 2 options. either refer specific method in comment: /// <summary>a link <see cref="methoda(int)" /> or 1 of it's overloaded variants</summary> alternatively, can add m: prefix remove error though may not quite require: /// <summary>a link <see cref="m:methoda" /></summary>

xml - Receiving Database Change Notifications in Oracle Using BizTalk Server -

Image
i have implemented database change notifications concept using biztalk in oracle not getting rowid main field me when changes happened. getting output below, how can row id? the second problem whenever changes happening in database notification not coming until , unless run below query in database grant change notification username how can make these permissions persist? option 3 need enable. from registration properties developing applications database change notification registration properties oracle database supports following options object registration: purge on notify option: unregistering after first change notification. timeout option: specification of registration expiration after time interval. rowid s option: rowid s of changed rows part of notification rowid option. reliable notification option: default, notifications generated in shared memory. if option chosen, notifications generated in persistent database queue. ...

python 3.4 - Pycharm unresolved attribute reference warning -

please consider following code: import numpy np r = [1, 0, -1, 0] bins = np.fft.fft(r) / len(r) x = bins.view(float) given above code pycharm returns warning: unresolved attribute reference 'view' class 'int' if split line 4 2 lines like bins = np.fft.fft(r) bins = bins / len(r) , same warning appears. following not throw warning: bins = np.fft.fft(r) bins /= len(r) why pycharm treat bins of type int in first 2 versions , how , why augmented assignment change behavior? i running pycharm 4.5.1 community edition on yosemite.

mongodb - Get document based on last item in arrays property -

i need retrieve orders, based on status code on property on last element in array. my structure follows. { "_id" : "3580bdba-4017-40af-939d-7391d70b3511", "ispublic" : true, "mailreceiptdispatch" : { "transfersupervisor" : { "transferstatuses" : [{ "transferstate" : 0, "transfertime" : isodate("2015-05-29t11:21:20.722z") }, { "transferstate" : 1, "transfertime" : isodate("2015-05-29t11:54:10.013z") }, { "transferstate" : 2, "transfertime" : isodate("2015-05-29t11:54:12.462z") }], "istransferedlimitreached" : false, "latesttransferingstatus" : { "transferstate" : 2, "transfertime" : isodate("2015-05-29t11:54:12.462z") } }, "exceptionlog...

javascript - Reading XML with jQuery and AJAX Unsuccessful -

i've been trying load xml standalone html page. since i'm working standalone computers well, have neither internet connection nor server files, xmlhttprequest doesn't work. i've read here can use jquery ajax load xml html, reason won't load information stored on it, if use codes i've found here. i've downloaded jquery library jquery site, , based on found here code looks this: $(document).ready(function(){ $.ajax({ type: "get", url: "myxml.xml", datatype: "xml", success: function(xml) { var myxml = $(xml).data(); } }); }); when time being i'm trying read data, not use it. myxml doesn't have data begin @ moment (like said, actual xml on standalone), how looks: <?xml version="1.0" encoding="utf-8"?> <type> <type id="1"> <model> lenovo </model> <year> 2015 </year...

c - Printing an array of characters with "while" -

so here working version: #include <stdio.h> int main(int argc, char const *argv[]) { char mytext[] = "hello world\n"; int counter = 0; while(mytext[counter]) { printf("%c", mytext[counter]); counter++; } } and in action: korays-macbook-pro:~ koraytugay$ gcc koray.c korays-macbook-pro:~ koraytugay$ ./a.out hello world my question is, why code working? when (or how) while(mytext[counter]) evaluate false? these 2 work well: while(mytext[counter] != '\0') while(mytext[counter] != 0) this 1 prints garbage in console: while(mytext[counter] != eof) and not compile: while(mytext[counter] != null) i can see why '\0' works, c puts character @ end of array in compile time. why not null work? how 0 == '\0' ? as last question, but why not null work? usually, null pointer type. here, mytext[counter] value of type char . per conditions using == operator, c11 standa...