Posts

Showing posts from July, 2013

sql - Table returning multiple rows for single join match -

i have table called "items" itemnumber | material ------------------------------ 1234 | cast 234a | tool plate and table called "material" material | process -------------------------------- cast | anodize tool plate | blah i doing select on tables join: select process,material.material items inner join material on items.material=material.material items.itemnumber = '1234' and return of anodize |cast tool plate| cast 'cast' has match of 'anodize', returning each combination. i've tried every join type know of , produces same results. doing wrong? other typo item.material (it should items.material ), query works fine, assuming have presented facts correctly data. try out demo here: sql fiddle

ios - Facebook Login integration into Parse.com App -

Image
i trying implement facebook login option in app. followed instructions on parse website , on facebook developer page. added frameworks, modified plist file , added proper code when launch app exception: 2015-07-14 17:50:08.939 ########[35815:2144465] -[parsemanager coremanager]: unrecognized selector sent instance 0x7f9cdadad720 2015-07-14 17:50:08.953 ########[35815:2144465] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[parsemanager coremanager]: unrecognized selector sent instance 0x7f9cdadad720' *** first throw call stack: ( 0 corefoundation 0x000000010a3cdc65 __exceptionpreprocess + 165 1 libobjc.a.dylib 0x000000010a066bb7 objc_exception_throw + 45 2 corefoundation 0x000000010a3d50ad -[nsobject(nsobject) doesnotrecognizeselector:] + 205 3 corefoundation 0x000000010a32b13c ___forwarding___ + 988 4 corefoundation

ruby on rails - PrawnPDF Flip Entire PDF -

i'm using prawn pdf create label send label printer, label prints upside down. important shipping labels use come print on it. setup i'm using (an ipad through lantronix xprintserver zebra printer) won't allow me flip using drivers. so i'm wanting know if there way using prawn (or rails) flip entire document (which contains 2+ pages) prints out correctly on labels. order of pages isn't essential. i haven't used prawn lately, i'm pretty sure using rotate method @ top of code work. you'll need either set origin center of page, or use translate reposition content after rotation. page 29 in manual (pdf) has example code.

r - Why are these numbers not equal? -

the following code wrong. what's problem? i <- 0.1 <- + 0.05 ## [1] 0.15 if(i==0.15) cat("i equals 0.15") else cat("i not equal 0.15") ## not equal 0.15 general (language agnostic) reason since not numbers can represented in ieee floating point arithmetic (the standard computers use represent decimal numbers , math them), not expected. true because values simple, finite decimals (such 0.1 , 0.05) not represented in computer , results of arithmetic on them may not give result identical direct representation of "known" answer. this known limitation of computer arithmetic , discussed in several places: the r faq has question devoted it: r faq 7.31 the r inferno patrick burns devotes first "circle" problem (starting on page 9) david goldberg, "what every computer scientist should know floating-point arithmetic," acm computing surveys 23 , 1 (1991-03), 5-48 doi>10.1145/103162.103163 ( revision availa

asp.net mvc 4 - BetterCMS Security options -

hi i've started new build bettercms, theres issue, within cms.config ive added following code: <security accesscontrolenabled="true" fullaccessroles="owner" encryptionenabled="false" encryptionkey="bettercmstest"> <defaultaccessrules defaultaccesslevel="readwrite"> <add identity="everyone" accesslevel="read" isrole="true" /> <add identity="authenticated users" accesslevel="read" isrole="true" /> </defaultaccessrules> </security> now should identity="everyone" have default access level set read. when ever create new page or blog set no access. has had sort of issue before , if there i'm missing out. here site documentation: https://github.com/devbridge/bettercms/wiki/cms-configuration#security-configuration so code looks good, bettercms inheriting properties master class news or blog pages. if new

symfony - Get a message from swiftmailer about registration -

i use fosuserbundle registration. want after registration send email message success. config.yml looks like. fos_user: db_driver: orm firewall_name: main user_class: games\modelbundle\entity\users registration: confirmation: enabled: true from_email: address: registration@trololo.com sender_name: registration service: mailer: fos_user.mailer.twig_swift resetting: email: template: corebundle:email:resetting.email.html.twig swiftmailer: transport: "%mailer_transport%" host: "%mailer_host%" username: "%mailer_user%" password: "%mailer_password%" spool: { type: memory } my question is: how check if message sent? i'm guessing first want test locally if code works intended. try "profiler" after registering, should hold emails. or if write functional test it, should idea: http://symfony.com/doc/current/cookbook/email/testin

ios - Unable to archive project with xcodebuild command: code sign error, missing provisioning profile? -

i'm using xcode 6.4 , associated command tools. i'm trying archive create ipa of app command: xcodebuild -scheme myscheme -archivepath myprojectname archive but error message: check dependencies code sign error: no matching provisioning profile found: build settings specify provisioning profile uuid “xxxxxxxxxx”, however, no such provisioning profile found. codesign error: code signing required product type 'application' in sdk 'ios 8.4'quote but uuid said in such message, not uuid of provisioning profile i've set in target`s build settings > code signing > provisioning profile. in fact, don't know provisioning profile error message talking about... there other place in xcode provisioning profile set , haven't noticed it? how check provisioning corresponds such uuid? thanks this depend on how have project's build configuration setup, if inheriting build configurations other .xcconfig files, , automat

Meteor Template.onRendered or Template.rendered for using a jquery library? -

i want use chosen(a jquery library) meteor , need use code: $('#ship').chosen(); i tried using .onrendered need wait, if want work template.createtradeform.onrendered(function(){ //strange bug, need wait here or doesn't work.. settimeout(function(){ $('#ship').chosen(); }, 2000); }); same problem solution: template.createtradeform.rendered = function(){ //here again, need wait or doesn't work settimeout(function(){ $('#ship').chosen(); }, 2000); }; is there other solutions problem? settimeout isn't here. edit helper requested template.createtradeform.helpers({ 'getships': function(){ return ship.find() } }); wrap code inside meteor.defer , this: template.createtradeform.onrendered(function(){ meteor.defer(function(){ $('#ship').chosen(); }); }); meteor.defer corresponds settimeout of 0 , it's not in docs. typically solv

node.js - Where is 'NODE_ENV' being set to 'production'? -

i tried run npm install install packages newly added dev dependencies package.json . surprise couldn't npm install of new dev dependencies. after digging around realised node_env environmental variable set production . appears set default when open new shell (i can see using printenv ), , isn't being done in ~/.bash_profile . inside ~/.npmrc contains commented lines, where might being set? edit: i'm on osx, , there nothing wrong package.json . can install dev dependencies using node_env=development npm install . it's not being set in: ~/.bashrc ~/.bash_profile ~/.npmrc /etc/profile.d/* you have couple of places check: ~/.bashrc ~/.bash_profile ~/.npmrc ~/.zshrc (if you've got zsh installed) /etc/profile.d/env (or similar file) you run export node_env=development before running npm install , or see here more information npm install: https://docs.npmjs.com/misc/config#production might want paste package.json file here , have sanity che

css - Bootstrap responsive scaling issue on smaller than 1920 x 1080 resolutions -

i have private video site that's main aimed towards home networks , desktop computers, however, site constructed on 1920x1080 resolution if that's smaller site looks catastrophe. here code page. <nav class="navbar navbar-trans navbar-fixed-top" role="navigation"> <div style="width:66%" class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapsible"> <span class="sr-only">toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse" id="na

PHP How to get the intersection of two or more arrays -

i trying intersection of 2 or more arrays kind of structure: first array: array( [0] => array( ['room_id'] => 21 ['room_name'] => 'gb 101' ['capacity'] => 40 ) [1] => array( ['room_id'] => 22 ['room_name'] => 'h 114' ['capacity'] => 20 ) [2] => array( ['room_id'] => 23 ['room_name'] => 'gb 203' ['capacity'] => 20 ) [3] => array( ['room_id'] => 25 ['room_name'] => 'h 100' ['capacity'] => 30 ) [4] => array( ['room_id'] => 26 ['room_name'] => 'gb 206' ['capacity'] => 40 ) ) second array: array( [0] => array( ['room_id'] => 21 ['room_name'] => 'gb 101'

dependencies - How to execute n1ql query of Couchbase in scala? -

i want execute nickel query in project , want convert task doing using view perform nickel. possible..?? if yes please provide example , executing nickel queries in scala,and have add additional dependencies in project. if yes please provide link too. any suggestions appreciated we planning/working on scala driver, right can use java sdk through scala pretty easily. recommend follow official docs, convert java examples scala: http://docs.couchbase.com/developer/java-2.1/java-intro.html you want java-client dependency first: librarydependencies := "com.couchbase.client" % "java-client" % "2.1.4" if use implict conversions, can make life little easier too: import com.couchbase.client.java.couchbasecluster import com.couchbase.client.java.query.query import scala.collection.javaconversions._ object connectandquery { def main(args: array[string]): unit = { val cluster = couchbasecluster.create() val bucket = cluster.openbuc

Why does Rails start GETs only on page reload? -

in console, when loading page, usual list of executed commands so: started "/employees" ::1 @ 2015-07-14 10:36:25 -0400 processing employeescontroller#index html employee load (0.2ms) select "employees".* "employees" rendered employees/index.html.erb within layouts/application (7.7ms) rendered layouts/_shim.html.erb (0.1ms) rendered layouts/_header.html.erb (0.9ms) rendered layouts/_footer.html.erb (0.1ms) completed 200 ok in 438ms (views: 433.9ms | activerecord: 2.4ms) but when reload page, same previous block, huge list of started get commands so: ... started "/assets/static_pages.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1" ::1 @ 2015-07-14 10:38:32 -0400 started "/assets/sessions.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde450b5c157aa5f95c05.js?body=1" ::1 @ 2015-07-14 10:38:32 -0400 started "/assets/users.self-877aef30ae1b040ab8a3aba4e3e309a11d7f2612f44dde45

c# - Log to database with EF Code First -

i have log4net log database. have added adonetappender written in docs . docs give definition log-table create. since using entity framework code first , recreating database quite ( dropcreatedatabasealways ) during development, don't want manually create table. tried create class log instead matches definition in docs. public class log { public int id { get; set; } public datetime date { get; set; } public string thread { get; set; } public string level { get; set; } public string logger { get; set; } public string message { get; set; } public string exception { get; set; } } however, when using adonetappender error seems unrelated cannot drop database "aspnet-mydb-20150625044347" because in use. but disappears if take out adonetappender . how can log database entity framework code first? thank help. the answer here may solve problem. main issue database still has open connection. short clip use pooling=fals

java - Issues with javac compilation errors and Maven dependency resolution -

i'm "noob" when comes maven. i've used ant in past, not enough maven make "stick" me. here problem. i'm attempting write java program parse json files relevant information , generate csv files upload using proprietary tool uploads csv files. built project using maven. program use google gson library, listed dependency in pom file (included below). when execute "mvn compile", maven returns error indicating package maven should resolving via dependency management features doesn't exist. specific error: "error: package com.google.code.gson not exist" here pom file: <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.acumen.app</groupid> <artifactid>

Generic MongoRepository Interface for Multiple Documents in MongoDB -

here example on accessing person document mongodb. public interface personrepository extends mongorepository<person, string> @query("{ 'firstname' : ?0 }") list<person> findbythepersonsfirstname(string firstname); } if have 5 documents ex: person, family, relation. etc. need create 5 repositories , extend mongorepository or there way achieve in 1 mongorepository.

java - Display only 2 digits after decimal -

bill[p][l][0] = new decimalformat("##.##").format(double.parsedouble(i2[m][0])); the code entered above not working; input 10.0 gives 10 output. it working - # means digit printed if it's relevant (see documentation ). try using bill[p][l][0] = new decimalformat("##.00").format(double.parsedouble(i2[m][0]));

javascript - Load json from file uploaded -

i have file input , submit button. file uploaded contains json needs loaded in view, (a graph display). don't need store file, visualize it. is there way using jquery, javascript or angular? application included static content inside spring app, has function standalone app also. actually can load file server or make request rest endpoint, need add option load local file json data. thanks in advance this work ie >= 10. aware there no fault handling implemented. i'll leave ;) html: <input type="file" id="file" name="file"> <button type="submit" id="button">click!</button> js (jquery): $('#button').on('click', function() { var reader = new filereader(); var file = $('#file').get(0).files[0]; reader.onload = function(e) { console.log(json.parse(e.target.result)); }; reader.readastext(file); });

c++ - Template alias for another alias -

this question has answer here: where , why have put “template” , “typename” keywords? 5 answers i have problem 'using' keyword in c++11. piece of code should create alias pointer type. template <typename t> class someclass { typedef typename std::add_pointer<t>::type pointer; template <typename u> using rebind_pointer = typename std::pointer_traits<pointer>::rebind<u>; } someclass<int> obj; but in gcc 4.7 i've got compile error: typename std::pointer_traits<int*>::rebind names template<class _up> using rebind = _up* , not type i found out pointer_traits::rebind template alias maybe problem ? you need tell compiler parse rebind template: template <typename u> using rebind_pointer = typename std::pointer_traits<pointer>::template rebind<u>; //

mysql - Query multiple tables with linked data -

Image
overview: i have rails project using mysql db has data being upload 2 sources college students grades. when go upload grades, need first find "enroll" record section of course student enrolled in. "enroll" connected both "student" , "section" belongs_to. student exist in students table, section , enroll may or may not exist. if not exist want create them. current code: my current attempt solve is: enrolled = enroll.find_or_create_by(student: student, section: {course: course, semester: semester, year_offered: year_taken}) i getting following error: mysql2::error: unknown column 'section.semester' in 'where clause': select enrolls .* enrolls section . semester = 'fall' , section . year_offered = 2012 , section . course_id = 4 , enrolls . student_id = 11 limit 1 questions: 1) right way go query? need make multi-step in case section doesn't exist? 2) why getting unknown column error?

Using spring integration as a mediator -

i try use spring integration simple mediator. have webapp residing on intranet can not accessed outside. want expose app through mediator in dmz. means url:s http://gateway/theapp/ * should forwarded http://internal/theapp/ *. simple in theory seems component handling outgoing http-reuests in spring integration (httprequestexecutingmessagehandler) needs explicut uri, i.e no wildcard matching. can achieved spring integration? the inbound gateway puts url header; can use expression on outbound gateway... url-expression="headers['http_requesturl'].replace('gateway', 'internal')" if using java @configuration , can use constructor takes expression ... expression expression = new spelexpressionparser().parseexpression( "headers['http_requesturl'].replace('gateway', 'internal')"); this test case similar grabbing query string , appends new url. in case, puts query string in payload; added header ins

jquery - Javascript menu bold selected, un-bold the rest -

i have asp mvc app has menu javascript behind move page page. now, when select menu item, becomes bold. stays bold when select different menu item. if click menu items, become bold , stay way. here code 1 menu item: <script> $('#firstmenuitem').click(function () { $('#div').load( "@url.action("firstmenu","someitem")", { 'id':'123'}, function (response, status, xhr) { if (status == "error") { alert("an error occurred while loading data."); } }); this.style.fontweight = 'bold'; }); </script> i want change code when select menu item, 1 become bold, , rest normal font. how this? jquery provides siblings function can use, assuming menu items live in same parent element. $(this).siblings().css('font-weight', 'normal') here's

android - How to export push notification data from Parse -

we started use parse cloud platform our android app pushing notification our customers. looking export daily pushed notification parse. is there way export data shown in push tab on parse dashboard ? i see there same thread looking same thing haven't share solution. ( https://parse.com/questions/how-to-export-analytics-push-notifications-sent ) is there api or method download pushed notification data thanks no, yes. we ran similar issue , decided build pushnotifications class in our parse database. tracks push payload, number of opens, etc. , allows export data our clients. it pretty easy set up: create class add object every time send push (we use cloud code method sending pushes , added object creation there) when user opens push, increment numberofopens number field on object hope helps!

jsf - How to globally inform sessionscoped beans to reload their data? -

i have session scoped bean stores selected employee. visible input offers ability change selected employee @ time. because there plenty of adjustable settings (and views) couple of session scoped beans hold @postconstruct loaded data inside member variables, , wouldn't reload data storage time view opened (@viewscoped). i don't have idea how inform active beans new selected employee. any hint welcome ... ;) i use tomcat 8, primefaces 5, jsf 2.2. since don't want reload data every time page loaded, @ least search selected employee , if it's same, update. if not, don't need thing.

javascript - how to search using multiple parameters in angular in a single search box? -

i have search field , want apply filter onto , want json data searched multiple parameters , want specify parameters in such way can change them @ time of api calling , here in code name , branch category able search name , not getting clue how fix , kindly help here code index.html <!doctype html> <html lang="en" ng-app="myapp"> <head> <meta charset="utf-8"> <title>dynamic pagination w/ filtering</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content="kim maida"> <!-- js libraries --> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js" type="text/javascript"></script> <script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0

ios - How to add reboot button to Jailbreak Application in Theos -

to make respring button, can write code follows: - (void)viewwillappear:(bool)animated { [super viewwillappear:animated]; uibutton *btn = [uibutton buttonwithtype:uibuttontyperoundedrect]; [btn settitle:@"respring" forstate:uicontrolstatenormal]; btn.frame = cgrectmake(100,50,120,100); [btn addtarget:self action:@selector(buttonpushed:) forcontrolevents:uicontroleventtouchupinside]; [self.view addsubview:btn]; } - (void)buttonpushed:(id)sender { system("killall -9 springboard"); return; } but make reboot button, doesn't seem able . what code should write? try doing this: - (void)buttonpushed:(id)sender { [[uiapplication sharedapplication] reboot]; return; } i tried in sample project found here , worked. replaced template's call [[uiapplication sharedapplication] relaunchspringboard]; with [[uiapplication sharedapplication] reboot];

c# - Asp.Net Viewstate exceeds max request length -

i'm stuck problem causes webapplication crash on regular bases. client (browser) http status code 500 after making (more 1) requests server. turned on iis failed request tracing , discoverd, request exceeded max request limit: maximum request length exceeded i looked @ hidden __viewstate field , found, contains information expected , cryptic (probably base64 encoded) serialized object 49,500 characters. didn't know, why large , checked session , viewstate objectes in code behind. nothing suspicious. since i'm displaying 2 asp.net charts , large data table (5k rows , aprox 20 cols) went web.config file , increased request limit to </system.web> <httpruntime maxrequestlength="4194304"/> </system.web> that kinda successfull, meaning server survived 1 more request bevore crashing outofmemoryexception , claiming there no more memory available. by now, i'm pretty sure there (and mean tons) unwanted, unneccesary, unused object

ruby - Lossy Split and Join Expression -

i'm using split(/ /) method, after join them ending white spaces gone. the string matched against this: "word word word " the array returned split(/ /) this: ["word", " ", "word", " ", " ", "word"] i expected this: ["word", " ", "word", " ", " ", "word", " ", " "] this should work you str.scan(/\w+| /) this example 2.2.1 :003 > "word word word ".scan(/\w+| /) => ["word", " ", "word", " ", " ", "word", " "]

filtering - Filter is not working in ios -

i used nspredicate filter nsmutablearray 1 & multiple values,first tried filter price, have saved nsdictionary value nsmutablearray (i.e) resultarray,here code me, (int i=0; i<=resultarray.count; i++) { nsdictionary *dict=resultarray[i]; nslog(@"dict %@",dict); nspredicate *predit=[nspredicate predicatewithformat:@"(price == %@)", @"100"]; nsarray *resultar = [[dict allvalues] filteredarrayusingpredicate:predit]; nslog(@"output %@",resultar); } dict { name = "black eyed peas"; percentage = 0; price = 80; } and result array is: result ( { name = "black eyed peas"; percentage = 0; price = 80; }, { name = "black gram"; percentage = 0; price = 56; }, { name = "channa white"; percentage = 0; price = 100;

if statement executing after condition failed (C- Multithreading) -

i encountered problem in project, , don't know have next (it's happening when load test , multi-threaded programming). problem related if inside else-if... #define failure -1 #define success 1 #define error_getting -203 #define non_mms_dest_client 2 #define other_network_dest_client 6 int get_event_type(char *eventtype, char *domainname, char *dest, int sendertype) { int iret=0; int spin_retstatus=0; ret = get_client_interface_type (tbuff) ; log_msg (g_log_fp, log_debug, "ret [%d] get_client_interface_type",ret); if(ret == non_mms_dest_client) { /* not executing in current scenario */ } else if(ret == other_network_dest_client) { /* i'm getting return value 6 other_network_dest_client */ log_msg(g_log_fp,log_debug,"establishing connection"); spin_retstatus=contact_event_type_over_udp(tbuff,&domain,null,0); /* return values: success & failure */

polymer - Paper-dialog shows up behind drawer-panel when placed in a custom element -

Image
the paper-dialog shows behind drawer-panel when launched custom element. here's modified "my-greetings.html" custom element polymer-starter-kit show dialog: <dom-module id="my-greeting"> <style> :host { display: block; } @media (max-width: 600px) { h1.paper-font-display1 { font-size: 24px; } } </style> <template> <paper-dialog id="bigdialog"> <h2>scrolling</h2> <paper-dialog-scrollable> <p>lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p>lorem ipsum dolor sit am

c# - How to use controls from derived class in base window class -

this question has answer here: xaml usercontrol inheritance 2 answers i creating base window class want use store common code our windows. know windows have text box , combo box used same purpose. public abstract class windowbase : window { protected virtual void savetextboxvalue() { } protected textbox textboxnotes { get; set; } } public class mywindow : windowbase { public mywindow() { initializecomponent(); textboxnotes = txtnotes; // have set in every inherited class } } is there way use textbox mywindow classes without need set in every conrete class? in constructor of abstract class set finding first textbox in window or whatever way u want identify text box.

c++ - How to pass a string value to K object in kdb+ -

these days written c++ interface called kdb+. in cpp file, define function follows: enter extern "c" k printinfo(k firstname, k secondname, k age) { if (firstname->t != -ks || secondname->t != -ks || age->t != -kj) { printf("invalid params\n"); return krr("invalid params"); } printf("firstname:%s\tsecondname:%s\tage:%ld", firstname->s, secondname->s, age->j); return (k)0; } after compiled dll, write q script file call it. code followed: / dll mymoving load functions , assign named variables / 2: used loading / 3 @ end specifies number of arguments printinfo:`myprint 2:(`printinfo;3) printinfo["yunfeng";"zhou";23] / printinfo[`yunfeng;`zhou;23] however, did not work. tried google , kx web side solve problem, did in vain. your code should work fine if pass names symbols. if want allow character vectors, should allow firstname->t == 10 , same secondname when

sybase - Print sql output messages to a file in shell script -

i need run sql scripts , wanted capture output log file. trying access sybase using isql , below sample file, though echo messages getting printed in log file. command running on windows box this: ./test.sh > $jobsroot/test/scripts/logtest/test.log 2>&1 #!/bin/sh #ident "%w%" # echo "trying print" isql_eod="$isql -s $db_server -u $db_drmsuser -p $db_drmspass -w999" cd ${jobsroot}/test/scripts/logtest/ echo "echo prints" $isql_eod << adde set nocount on select 'a housekeeper job' set nocount off adde first time doing hence wrong anywhere in this, please me understand , find out faulty line. seems command missing go in isql, commands executed issuing go on it's own line. set nocount on select 'emea vpe vot morning housekeeper job' set nocount off go

oracle - Returning the BLOB value from a database -

i'm working on windows application reads .wav files byte array , stores byte array oracle database. i'm storing bytes blob , and conversion seems working since there's no corruption. my problem have no idea on how read bytes database. need able read bytes database , convert them original .wav format. i tried clob files got corrupted after uploading them database. im using visual studio 2012 , oracle 10g. i have no idea how works in visual studio 2012. can use pl/sql procedure sth. that. have @ link: downloading documents custom table

java - Multiple annotations found at this line: in jsp code -

<%@ page language="java" contenttype="text/html; charset=iso-8859-1" pageencoding="iso-8859-1"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=euc-kr"> <title> :: employee list :: </title> </head> <body> <table border=1> <thead> <tr> <th>id</th> <th>name</th> <th>dob</th> <th>salary</th> <th>active</th> <th colspan=2>action</th> </tr> </thead> <tbody> <!-- warnings start here unknown tag... --&

php - Yii, PHPMailer : how to send an email with HTML and ICS format -

i trying send email html , ics format gmail, outlook, yahoo, thunderbird, outlook express 2013 , iphone, able send ics format gmail, outlook , yahoo. issue not able send html format in same mail tried following code public function createschedulenotification(){ $from = 'info@careervita.com'; $fromname = 'info'; $to = 'testcareervita@outlook.com'; $subject = 'invitation test demo'; $desc = 'this test demo invitaion'; $uid = date('ymd').'t'.date('his')."-".rand(); $message = "begin:vcalendar\r\n"; $message.= "prodid:-//zoho crm//nonsgml calendar//en\r\n"; $message.= "version:2.0\r\n"; $message.= "x-wr-timezone:gmt\r\n"; $message.= "x-wr-calname:zcrm\r\n"; $message.= "method:request\r\n"; $message.= "calscale:gregorian\r\n"; $message.= "begin:vevent\r\n"; $m

TCPDF - How to hyperlink text to external document using TCPDF -

does know how hyperlink text within pdf external attached document. using annotation() , bookmark() functions include links in sidebar, can't seem figure out how provide link within pdf document itself. appreciated. bad, new stack , screen in wouldn't let me use line breaks - in wrong place. sorry that. the code link needs go is: $txt.=' '.stripslashes($contents).''; i use writehtml() process file text within contents string needs replaced text link attached document. the sidebar code use is: $pdf->annotation(-10, -10, 0, 0, $fndesc, array('subtype'=>'fileattachment', 'name' => 'pushpin', 'fs' => $attachment)); $pdf->bookmark($fndesc, 0, 0, '', 'b', array(0,64,128), -1, $fn); the real issue replace pushpin inside of primary document (not sidebar) linked text. thank responding.

ios - Build Failed -- AppService.h file is not found -

i have written share extension ios. have setup new project using same share extension. copied , paste entire code , directory. do need include header in x-code. how setup headers in case. now, when trying build project. giving me error . **appservices.h file no found.** do need change settings in x-code thanks

How to get dropdownlist selected value in Page_Init event c# -

i tried below code in page_init() getting null values. how dropdownlist selected values in page_init(). protected void page_init(object sender, eventargs e) { string test1 = request.form[ddlprojectresource.text]; string test2 = request.form[ddlprojectresource.selectedvalue]; }

java - spring boot 1.2.5 @Configuration @Autowired annotation null? -

primarydatasourceproperties.java application.properties content, right. datasourceconfig.java inside method @bean ... primarydatasource () no primarydatasourceproperties , primarydatasourceproperties null , @autowired injected, problem may ask reason? btw: demoapplication.java try join enableautoconfiguration , primarydatasourceproperties.java try @component the result no different here code: resources/application.properties datasource.primary.driver-class-name=com.mysql.jdbc.driver datasource.primary.url=jdbc:mysql://localhost:3306/demo?characterencoding=utf8 datasource.primary.username=root datasource.primary.password= com.demo.config.primarydatasourceproperties.java @configurationproperties(prefix="datasource.primary") public class primarydatasourceproperties { private string driverclassname; private string url; private string username; private string password; public string getdriverclassname() { return driver

Setting Wix icon when advertise is set to no -

seems i'm forever asking questions wix. should last, , it's polishing one. i'm wanting associated files have icon go them, in progid element, advertise not specified assume defaults no. therefore in wix documentation, states: for advertised progid, id of icon element. non-advertised progid, id of file containing icon resource. i'm not understanding how works @ all. set folder contains icon , reference iconindex? part of .wxs i'm working with. <component id ="myapp.exe" guid="{guid-here}"> <file id="myapp.exe" keypath="yes" source="$(var.myapp.targetdir)myapp.exe" /> <progid id ="myappprogid" description="myapp data files" icon ="logo.ico" iconindex="0"> <extension id ="myapp" contenttype="application/myapp"> <verb id ="open" command="open&quo

module - Python class can't be updated after being compiled -

i started python couple of days ago, coming c++ background. when write class, call script, , afterwards update interface of class, behaviour find unintuitive. once compiled, class seems not changeable anymore. here example: testmodule.py: class testclass: def __init__(self,_a): self.first=_a def method(self, x, y): print x testscript.py: import testmodule tm=testmoduleb.testclass(10) tm.method(3, 4) execution gives me 3 now change argument list of method : def method(self, x): , delete testmodule.pyc , in script call tm.method(3) as result, get typeerror: method() takes 3 arguments (2 given) what doing wrong? why script not use updated version of class? use canopy editor saw behaviour python.exe interpreter. and apologies, if similar asked before. did not find question related one. python loads code objects memory; class statement executed when file first imported class object created , stored in module namespace. s

python - Django do not render ModelForm -

i working on little project on django, have had issues on rendering modelform. in main.html tag {{form.ad_p}} doesn't seem working. see "save" button , don't see modelform fields. if put below code shell form = addpath() form.as_p() i see: form.as_p() u'<p><label for="id_name">name:</label> <input id="id_name" maxlength="200" name="name" type="text" /></p>\n<p><label for="id_route_data">route data:</label> <textarea cols="40" id="id_route_data" name="route_data" rows="10">\r\n</textarea></p>' can explain, doing wrong? i searched on stackoverflow, same problem hasn't been resolved. hope, i'll more lucky models.py: from django.db import models django.contrib.auth.models import user class path(models.model): user = models.foreignkey(user) name = models.charf