Posts

Showing posts from February, 2010

Service for testing bounced email handling -

i'm sure must exist, can't find anywhere this. want online service provides email address can send email to, , guarantee bounce. the reason want test bounce-handling functionality of piece of software. can use kind of valid address know doesn't exist, doesn't seem practice, though one-off test, not automated (at least not yet). ideally, i'm looking mailinator, can send messages, see them pending, , choose whether bounce them, , type of bounce. google did turn address bounce-test@service.socketlabs.com, far can tell, it's no longer bouncing messages, because when try i'm not getting back. any suggestions? edit per john's post below, service seems working again - tested on 30th september 2016 gmail, , got bounce response within 5 minutes. we have bounce test email recommend our customers , free use it. it replies back: :fail: no such person @ address. the email is: bouncetest@tribulant.com we have listed in our documentation...

winapi - C Windows Add Default Search path for files (fopen...) -

i have written little interpreter can run scripts. convenience, associated file type (.apol) interpreter located in "c:\apol\interpeter.exe" whenever double click .apol file script interpreter pop , run file. but heres problem. lets assume script looks following: f = openfile("data.txt") //pseudocode of course, windows in directory of "c:\apol\" first file, want, windows in directory of scipt file instead of interpreter, somehow possible set up? you want use universal naming convention path syntax in call fopen. see fopen file windows network location also want find out script file user clicked on, located: int winapi winmain( hinstance hinstance, hinstance hprevinstance, lpstr lpcmdline, int nshowcmd ); the lpcmdline has information you.

plsql - Function dont return decimal places -

i have oracle function performs calculations, didn't return decimal of result. create or replace function my_teste return decimal begin return 1/3; end; if executed function select my_teste dual it return value 0 decimal places. expect return 0.3333 ideas ? decimal declared in package sys.standard subtype of number (as numeric types in oracle), number(38, 0), means decimal values not able have digits right of decimal point. in order have decimal values numbers right of decimal point have declared such, similar to dvalue decimal(38, 4) however, won't if want return such value function, because can't have precision specifiers on function return type. in order have decimal value digits right of decimal place returned function need declare subtype of decimal specifies correct number of decimal places , use subtype return type of function. here's example: declare subtype dec_10_3 decimal(10, 3); function test1 return decimal...

Error starting HBase in standalone mode -

i've downloaded , installed hbase 0.94.9 in ubuntu image. followed apache's getting started steps. said modify hbase-site.xml, though found mine had no properties defined in it. added two. here complete file: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>hbase.rootdir</name> <value>file:///home/dan/hbase</value> </property> <property> <name>hbase.zookeeper.property.datadir</name> <value>/home/dan/zookeeper</value> </property> </configuration> i have made sure /etc/hosts doesn't have 127.0.1.1 problem: 127.0.0.1 localhost 127.0.0.1 ubuntu # following lines desirable ipv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters if unders...

html - Jquery open file search windows -

i have create simple button : <button id="mybutton">search</button> i need open search file window when click on button. need behavior of input type file. and don't want use input type file :) any idea ? ! you can trigger click , listen #file change: $(function(){ $('#mybutton').on('click', function(){ $("#file").trigger('click'); }); $("#file").on('change', function(){ console.log(this.value); }); }); with this.value being filepath/file check jsfiddle

jailbreak - Hooking CFNotificationCenter for all darwin notifications - iOS -

i writing hook logs darwin notifications in system. hook below functions: cfnotificationcenterpostnotification cfnotificationcenterpostnotificationwithoptions nsnotificationcenter::postnotification nsnotificationcenter::postnotificationname i see lot of logs. example when unlock screen shows me sbdevicelockstatechangednotification. but expecting events - "com.apple.springboard.lockcomplete" or other events here not sure why not able capture darwin-like notifications. appreciated. here's code review #include <notify.h> #include <substrate.h> #include <sqlite3.h> #include <string.h> #import <corefoundation/cfnotificationcenter.h> //#include "cpdistributedmessagingcenter.h" #import <corefoundation/corefoundation.h> #import <quartzcore/quartzcore.h> #import <uikit/uikit.h> //#import <springboard/springboard.h> // init cfnotificationcenterpostnotification hook void (*orig_cfnotificationcenterpostno...

c++ - Visual Studio 2012 error: Assertion Failed -

i using vc++(2012) allegro 5.0.7. , following link tutorials. http://www.anothergames.com/book/allegro?page=3 i assertion failed error when compiled code present @ above given link. here snapshot of error. http://www.anothergames.com/phpbb/viewtopic.php?f=3&t=761&p=1045#p1045 please me out, have been wandering here , there fix. came here answer last choice. you trying use null bitmap. common reason running program directory not expecting, causing relative paths fail. read , follow advice of article solve issue.

angularjs - How to assign Boolean value to model -

i have following view 2 input radio buttons: <label> <input type="radio" name="test" ng-model="foobar" value="true" ng-change="logconsole()"> true </label> <label> <input type="radio" name="test" ng-model="foobar" value="false" ng-change="logconsole()"> false </label> and controller looks like: //initialization $scope.foobar = false; $scope.logconsole = function () { console.log("value : " + $scope.foobar); console.log("type : " + typeof $scope.foobar); //always displays 'string' }; my problem when user selects either of radio buttons, type of foobar model string, value either string 'true' or string 'false' - want type boolean true value or boolean false value. how can store boolean value (from within view) onto model? edit: tried out , still not wor...

python - Is there anyway to select and save any part of array? -

ı want select anypart of list , save while programming so ı m looking command f.save[i:j] ; f = open ("text.txt","w") f.write("123456789") **thats 9 bit , ı wanna selec between second , fifth bit ** = f.save[2:5] something you can use pickle , serializes array (and other python objects) , saves file. loads file , deserializes contents, giving off dictionary. read docs. can use 1 of it's implementations, i.e. shelve or persistent dict , supports json , other formats instead of pickle . you can use database sqlite or plain text file , use own implementation. i tried pickle not working me what not working? please give more thought question. try using shelve: >>> import shelve >>> = [1, 2, 3, 4, 5, 6, 7, 8, 9] >>> db = shelve.open('/path/to/my/database/file.db', writeback=true) # notice file must exist >>> db['a'] = a[2:5] >>> db.close() >>> quit() # new in...

javascript - Extjs, collapsed form panel. Title not showing up -

i have form panel in border layout follows: { xtype: 'form', region: 'north', split: true, labelalign: 'top', height: 130, autoscroll: true, collapsible: true, listeners: { 'collapse': function () { ext.getcmp('slider').settitle('filter events time'); // not working either } }, //collapsed: true, id: 'slider', title: 'filter events time', border: true, html: { tag: 'div', style: '', children: [{ tag: 'div', cls: 'slider_div', style: 'margin-right:50px;position:relative;float:left' }, { tag: 'div', cls: 'slider_unit', style: 'margin-top:10px' }, { tag: 'div', style: 'clear:left' }, { tag: ...

XML not referencing the XSD, namespacing issue -

this driving me nuts. trying create schema xml document. think pretty close reason, cannot figure out how name namespaces. looked online @ dozen articles , tried visual studio doesn't seem it. this xml file want create xsd for: <?xml version="1.0" encoding="utf-8" ?> <data xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="dataautonamespace dataautostructure.xsd" > <set id="hlm"> <!-- download page --> <item tag="tabs" value="tabs"/> <item tag="holdingslisttab" value="holdingslisttab"/> <item tag="backlink" value="back"/> <!-- holdings list section --> <item tag="holdingslist" value="holdingslist"/> <item tag="subtext" value="subtext"/> <item tag="format" value="format"/> <item tag="...

ruby on rails 3.2 - Passenger starting error with -e production -

when start passenger source ./railsenv.sh; passenger start -p 50060 -e production -d however, there errors ,when switch source ./railsenv.sh; passenger start -p 50060 -d. okay. anybody has ideas? env: rails: 3.2.13 passenger: 3.09 ruby 1.9.2 production.rb in enviroments: # code not reloaded between requests config.cache_classes = true # full error reports disabled , caching turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # disable rails's static asset server (apache or nginx this) config.serve_static_assets = false # compress javascripts , css config.assets.compress = true # don't fallback assets pipeline if precompiled asset missed config.assets.compile = false # generate digests assets urls config.assets.digest = true config.i18n.fallbacks = true # send deprecation notices registered listeners config.active_support.deprecation = :notify errors: ***[ pid=113...

NullReferenceException when trying to set registry permissions with C# -

Image
i'm trying set below permissions on registry key. nullreferenceexception error when tries. being novice makes tuff. throw in permissions (which have confused me) , i'm stumped. can tell me why i'm getting this? thanks. using system; using microsoft.win32; using system.security.accesscontrol; namespace consoleapplication7 { class program { static void main(string[] args) { registrysecurity rs = new registrysecurity(); string user = "everyone"; registrykey rk = registry.localmachine.opensubkey(@"\software\wow6432node\123test", true); rs.addaccessrule(new registryaccessrule(user, registryrights.fullcontrol | registryrights.takeownership, inheritanceflags.containerinherit, propagationflags.none, accesscontroltype.allow)); rk.setaccesscontrol(rs); } } } this line causing error registrykey rk =...

c# - Determine Current Page -

i have appbar button launches popup contains list user selects , upon 1 being selected refreshes page, before refreshes page need execute task. code works great on other pages. need execute await home.databasetest(); before refreshes page , want execute if current page dashboard private async void customernamepopup_tapped_1(object sender, tappedroutedeventargs e) { //gets selected customer name , stores in database. barcustomername = db.selectcustomernumberbycustomername(customernamepopup.selecteditem); rh.appdatahandler(customernamepopup.selectedindex, barcustomername); if ("what put here test if page equals dashboard") { await home.databasetest(); } if (this.frame != null) { //refreshes current page frame1.navigate(frame1.content.gettype(), rootpage); } } see note in loop before await task know asking for. thank you cre...

Is there a standard timeout value for TFTP? -

i've reviewed rfc 764 number of times. though describes timeout mechanism, there doesn't seem mention default timeout value. apparently, implementations default 1 second. ultimately, there official recommendation timeout value? there's not standardized tftp timeout value. rfc 1350 (the tftp protocol (revision 2) not specify timeout value. rfc 1784 (tftp timeout interval , transfer size options) define timeout negotiated parameter under framework defined rfc 1782 (tftp option extension) not define particular value either.

Getting Javascript Domain When Script Is From Another Domain -

i writing script suppose work across domains. trying include 1 script domain , have script include other scrips same domain example: domain 1 - www.mydomain.com <html> <head> <script type="text/javascript" src="http://www.example.com/app.js"></script> </head> </html> example app js var imported = document.createelement('script'); imported.src = window.location.host + 'config.js'; document.head.appendchild(imported); var imported = document.createelement('script'); imported.src = window.location.host + 'stuff.js'; document.head.appendchild(imported); the problem window.location.host gives domain script has been download to: www.mydomain.com . wanted domain script resides on, in exmaple www.example.com ? can done? , please no jquery. here alternate method newer browsers works dom-adder-injected scripts, not last script in getelementsbytagname("script"...

javascript - html Drag&Drop for text -

i developing online registration tool sportevents user can register them events. admin of event can edit email gets send users when registers. now wan´t add variables email in form [teamname]. wan´t show admin possible variables in list divs or else drag 1 of them textarea , on dragging position right text gets displayed. kinda code-tags here drag&drop functionality. looked @ jquery solutions, looks complicated such easy problem. did have idea how can make possible? edit: wan´t ad text textarea! text in textarea gets send on user via mail. javascript should copy specific text drop position in textarea. text should deppend on element drag list of container or other html tag. edit2: found this: http://skfox.com/jqexamples/insertatcaret.html thats close, wan´t insert text on position drop element thanks, yannick

sql - IN query condition with Entity Framework -

does entity framework provide way use in where condition? i'd use linq if possible generate query equivalent to: select * dbo.strains name in ('a', 'b', 'c', … ) var result = context.strains .where(s => new[] { "a", "b", "c" }.contains(s.name)); entity framework smart enough translate appropriate sql.

assembly - What is the syntax for OSX x86 GAS .macros? -

i having lot of trouble getting tiny macro work. .macro int_kernel subl $4, %esp int $0x80 addl $4, %esp .endm running assembler, -arch i386 upper.s -o ./upper.o upper.s:51:expecting operand before ','; got nothing upper.s:51:suffix or operands invalid `int' upper.s:51:expecting operand before ','; got nothing the errors come osx macro syntax using $0,$1,... refer macro's parameters. correct osx syntax constants in macro? solution: 2 dollars signs must used in subl $$4, %esp this correct syntax gas macro. uses no parameters. 3 instructions correct written. the as not gnu. it's distant relative, lot of modifications apple, can't rely on gnu documentation explain anything. example, try -arch option in gnu documentation... doesn't exist. you're going have refer apple's documentation. keep copy of here: http://developer.apple.com/documentation/developertools/reference/assembler one simple difference...

ios - UICollectionView not removing old cells after scroll -

Image
i have uicollectionview grid of images. when tap on one, opens grid , shows subview details. this: i open grid in uicollectionviewlayout adjusting uicollectionviewlayoutattributes , setting translation on transform3d property cells below current row of selected item. works nicely, , better animation , simpler approach first attempt @ inserting cell grid different size others. anyway... works of time, after continued use see old images on collection view. ghost cells. can't click them, it's haven't been removed collection view properly, , sit on top of cells preventing taps , being nuisance. this: any ideas why these cells doing this? edit: i'd add, think happens when scroll collection view fast. i've written own uicollectionviewflowlayout replacement test if still happens. does. edit 2: 3d transforms or layout have nothing this. must bug in uicollectionview. can exploit scrolling fast, letting come standstill , querying views on screen. there doubl...

ruby on rails - How do I set the font size in a prawn table? -

how set font size in pdf table using prawn gem? when call prawn following: pdf = prawn::document.new(:page_size => 'legal', :page_layout => :landscape) pdf.table data, :header => true, :column_widths => widths, :font_size => 7, :row_colors => ["eeeeee", "ffffff"] i nomethoderror undefined method `font_size=' #<prawn::table:0x6ce37ea4> when remove ":font_size => 7", renders undesirable font size. i using prawn 0.12.0, ruby 1.9.3p194, , rails 3.1.9. you have apply size property cell text directly. here how this: pdf.table data, :header => true, :column_widths => widths, :cell_style => { size: 7 }, :row_colors => ["eeeeee", "ffffff"] source: http://prawn.majesticseacreature.com/manual.pdf

javascript - Trying to traverse the DOM so unique video will play when certain div is clicked -

so, have requirement dynamically generated content blocks on page. these blocks have thumbnail , when clicked, should open modal, , display unique overlay window, as unique associated video. i trying write generic javascript traverse dom tree properly, when particular thumbnail clicked, modal, associated overlay, , associated video open. here example of have (there many of these, dynamically added): <div class="block"> <div class="thumbnail"> //thumbnail image </div> <p>video description</p> <div class="window hide"> <div class="video hide"> //video content </div> </div> </div> <div id="modal" class="hide"></div> and after attempting bunch of different things, ended trying javascript, doesn't work: $(".thumbnail").on("click",function(){ $("#modal")...

python os.environ, os.putenv, /usr/bin/env -

i want ensure os.system('env') not contain specific variable myname export in ~/.bashrc export myname=csj therefore, wrote below python code: import os def print_all(): print "os.environ['myname']=%s" % os.environ.get('myname') print "os.getenv('myname')=%s" % os.getenv('myname') os.system('env | grep myname') print def delete_myname(): if 'myname' in os.environ: os.environ.pop('myname') if os.getenv('myname'): os.unsetenv('myname') print_all() os.putenv('myname', 'csj2') print "---------------------" delete_myname() print_all() os.putenv('myname', 'csj3') print "---------------------" delete_myname() print_all() i think examine both os.environ['myname'] , os.getenv('myname') , delete them if exist, can ensure os.system('env | grep myname') nothing. however, result...

sql server - SQL Full text search Contains command -

i trying figure out why these 2 statements act differently select distinct field1, field2 sometable contains(*,'word1') , contains(*,'word2*') , contains(*,'word3') select distinct field1, field2 sometable contains(*,'"word1" , "word2*" , "word3"') i specifying indexed fields full text search why 2nd command return nothing first command returns expected results? want search accross fields of fields has word1 , word2 , word3, in 1 contains statement. i have ran issue before , design. see ms support article . assume have 2 columns c1 , c2. query listed contains(*,'"word1" , "word2*" , "word3"') is interperted as contains(c1,'"word1" , "word2*" , "word3"') or contains(c2,'"word1" , "word2*" , "word3"') so every word must in either column (c1 or c2). not return results if word1 in ...

java - Context path for tomcat deployed web application -

i have deployed web application on tomcat7 , looking forward update virtual host map domain name application updating server.xml. approach correct? working on ubuntu os , not sure how context path web app. appreciated. the context path of application name of war file. if want override it, can follow tomcat's documentation ( https://tomcat.apache.org/tomcat-7.0-doc/config/context.html ). edit server.xml in conf folder of tomcat installation , make following changes. <host name="localhost" appbase="webapps" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"> <context path="/yoururl" docbase="yourapp" usehttponly="false"> <manager pathname="" /> </context> </host>

projects and solutions - Visual Studio 2005: How do I find which build step in the .sln creates a specific file -

i trying automate build calling devenv.exe my_solution.sln /rebuild "project name" having problem because build.cmd file crucial build, not getting created in expected location. when open solution manually , choose build -> rebuild works fine , file created. how track down failure occurring, or find out in build file created? mind not developer , not know visual studio @ all. sysadmin trying developer.

action - Convert event delegate from C# to VB.NET -

tried convert code vb.net using various online converters none worked (got error on event handler declaration). i'm using vs 2012 , .net 4.5. ideas? readonly action<idialogmanager, action<bool>> closecheck; public void execute(actionexecutioncontext context) { closecheck(shell.dialogs, result => completed(this, new resultcompletioneventargs { wascancelled = !result })); } public event eventhandler<resultcompletioneventargs> completed = delegate { }; i created dummy types in linqpad , got this: readonly closecheck action(of idialogmanager, action(of boolean)) public sub execute(byval context actionexecutioncontext) closecheck(shell.dialogs, sub(result) raiseevent completed(me, new resultcompletioneventargs { .wascancelled = not result })) end sub public event completed eventhandler(of resultcompletioneventargs)

php - Composer - Prevent from installing ZF2 files -

i started working on new zf2 webapp , during composer configuration (installation of doctrine, zdt, zftool, etc.), noticed composer install zf2 files or components during downloading, if included in php.ini in zf2_path . is there way prevent composer installation zf2 in ./vendor directory? no. composer knows nothing include_path , installs locally. , thing, because version, projects needs , doesn't clash other projects. if want use shared dependencies, composer is, probably, not you.

google app engine - Cannot access API explorer on localhost -

i'm trying build endpoints application, new google app engine. as understand it, there's kind of api explorer included in sdk should let me test/verify api -- docs say: "test api backend in google apis explorer navigating http://localhost:8080/_ah/api/explorer ". can't find documentation of api explorer is, does, or looks like. in case, when try hit url, redirected https://developers.google.com/apis-explorer/?base=http://localhost:8080/_ah/api#p/ , tells me nothing useful, , seems must error of kind. the devappserver logs say: info 2013-07-17 17:27:54,574 server.py:593] default: "get /_ah/api/explorer http/1.1" 302 - info 2013-07-17 17:27:56,099 server.py:593] default: "get /_ah/api/static/proxy.html?jsh=m%3b%2f_%2fscs%2fapps-static%2f_%2fjs%2fk%3doz.gapi.en.7juwnuxmas8.o%2fm%3d__features__%2fam%3deq%2frt%3dj%2fd%3d1%2frs%3daitrsto0dpks_pssf5r3z87e6flfvdgdog http/1.1" 200 1933 info 2013-07-17 17:27:56,193 server.py:593...

assembly - What does it mean by MOV D D? -

Image
in assembly language, instruction mov b means moving content of b (source) a (destination). came instruction mov d d what imply? i have seen in lab manual. screenshot: the 8085 register-to-register mov instructions orthogonal. is, there opcodes move of 8-bit registers of other 8-bit registers. mov d,d moves contents of d register d register. doesn't useful , doesn't affect of flags, it's valid instruction mov a,a , mov b,b , etc. copying register "no operation" or nop instruction. "official" 8085 nop opcode 00 , of register-move-to-itself instructions have same effect. it's artifact of way processor designed. there tricks can make use of instructions, they're not useful.

html - Svg image does not show in Firefox -

inside simple svg element have image. chrome: version 28. - works perfect firefox: 22.0 - no image drawn opera: 12.16 - image show 4 times larger normal code: <svg width="500px" height="500px" viewbox="0 0 70 70"> <image x="0" y="0" width="10" height="10" id="knight" xlink:href="/images/knight.svg" /> </svg> your svg not being scaled fit 10x10 image rectangle because has no viewbox. svg renderers need know dimensions of svg content in order know how scale it. viewbox attribute for. try adding following root <svg> element in knight.svg. viewbox="0 0 45 45" also, need define namespaces svg , xlink. although perhaps have removed clarity(?).

sql - Update table based on a select from another -

i have select statement below use update quantity of products in table, tablex . cannot seem figure out how match product number query productnumber tablex , add quantity found in statement existing quantity in tablex. select p.productnumber, sod.quantity ,so.statecode salesorderdetail sod right join productassociation pa on sod.productid = pa.productid left join product p on pa.associatedproduct = p.productid left join salesorder on so.salesorderid = sod.salesorderid so.statecode = '3' you can have update base on multiple tables, syntax like update tablex set tablex.quantity = sod.quantity tablex join product p on tablex.productnumber = p.productnumber join... -- add rest of joins , conditions.

java - Using a break to get out of an enhanced for loop -

hi asked write following method homework , need clarification. want know if comparable item given parameter part of comparablelist array. assuming array sorted, told stop checking array if comparablelist has item in or if item smaller following item of array. used break not sure if break me out of enhanced loop avoid checking whole array if of conditions true. want make sure if there 50,000 items in array , find item @ position 5 stop checking rest of array. have never used break before not sure if me out of loop. public boolean contains(comparable item) { comparable[] comparablelist= getstore(); boolean isthere = false; for(comparable p : comparablelist) { if(item.compareto(p)==0) { isthere = true; break; } if(item.compareto(p)<0) { break; } } return isthere; } the break break out of loop, including enhanced one. solution work. however, since returning f...

Magento WSI SOAP v2 API Custom Webservice Returns Empty Response -

problem: succesfully call webservice, empty response in return. situation: i created new module structure , files following tutorial: magento: extending api (v2) mynamespace mymodule helper data.php model mymodel api v2.php etc api.xml config.xml wsdl.xml wsi.xml added module config in: app/etc/modules/mynamespace_mymodule.xml i debug call xdebug, , stops @ breakpoint inside webservice function the webservice supposed return simple string: "hello world" testing soapui empty response content length 0. what can wrong or missing!? appreciated. edit: i've managed debug call , realized when reaches class zend_soap_server on line 832 : $soap->handle($request); it doesn't execute further! don't know why. the wsdl.xml had small mis-configuration in following line: <binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> it should be: <soap:binding style="rp...

javascript - What is this: js? -

i came across code , wondering it? array? test = {a: [1,0,0], b:[0,1,0], c:[0,0,1]}; how array for instance? console.log(bases[a]); ^ results in "uncaught referenceerror: not defined" the output of console.log(test); object {a: array[3], b: array[3], c: array[3]} the output object {a: array[3], b: array[3], c: array[3]} shows that: test -> object a, b , c -> arrays to access a / b or c , use: console.log(test.a)

html - DIV display priority - a slide show over a DD menu -

i have drop down menu , slide show. want dd menu on slide show, not oposite. i have tried z-index, didn't work. thanks. edit: solved it, z-index wasn't in right place. that's common one, recommend use chrome developer tools or firebug inspect element , see css properties being applied. another gotcha elements must have css position. if item has position of static or no position specified, won't affected z-index .

java - Android gradle import lots of errors and trouble -

Image
im trying used new gradle system built new android studio. i've tried basic task, import websockets library project. imported module via normal route (file->project structure), imported java-websockets module in , added dependency too. import org.java_websockets class project. my project ended looking this: so problem starts, give shot , try build , run usual gradle errors. added 'include' line settings.gradle include ':java-ws-client' and 1 build.gradle compile project(':java-ws-client') so find myself stuck 2 problems: one undescriptive one: and another: i've tried updating android studio latest one, , project above fresh one. how can avoid pulling hair out? from screenshot, settings.gradle inside testprojectproject, makes testprojectproject root project. however, java-ws-client parallel testprojectproject, outside of testprojectproject's scope. cannot reference project outside scope using ":foobar...

python - Two Step Algorithm: Mapping an Input String to an Output String -

i've been puzzling on how function working in python. function, takes positive integers other positive integers follows: phi_m(n2) = phi_m(m*n + r) = m*x[n] + r*(x[n + 1] - x[n]) the above terms integer valued , defined follows: n2 = (n2)th slot of output string m = fixed positive integer n = multiple of m such n*m less or equal n2 r = remainder term fill in amount missing n*m in decomposing n2 x[n] = element in [n1]th slot of input string x[n + 1] = element in [n1 + 1]th slot of input string in general start string of numbers, 0, 1, 1, 2, 3, 3 , end string of (k+1)m-1 terms, k number of terms started with, excluding 0. use function first fix m, m = 2. decompose n2 in terms of m, n2 representing 'slot' of our output sequence. n2=5. asking 'what in fifth 'slot' of our output string'. in case our total output string of length (5+1)2+1. notice not count 0 - present , our purposes 0th term, hence have 5 initial terms. answer our question of ...

asp.net - PdfStamper.CreateSignature and empty MemoryStream -

using itextsharp 5.3.4.0, i'm having difficulty working pdfstamper , memorystream. the memorystream empty. pdfreader pdfreader = new pdfreader(server.mappath(@"document.pdf")); memorystream memorystream = new memorystream(); pdfstamper pdfstamper = pdfstamper.createsignature(pdfreader, memorystream, '\0'); //... pdfstamper.writer.closestream = false; pdfstamper.close(); byte[] bt = memorystream.getbuffer(); //.toarray() pdfreader.close(); download project (full source code) how can solve problem? thank you! in default.aspx.cs relevant left out in code block of question: pdfstamper pdfstamper = pdfstamper.createsignature(pdfreader, memorystream, '\0'); pdfsignatureappearance pdfsignatureappearance = pdfstamper.signatureappearance; //... pdfsignatureappearance.preclose(exc); //... pdfstamper.writer.closestream = false; pdfstamper.close(); whenever call pdfsignatureappearance.preclose, must use ...

html - The Server Tag is Not Well Formed - SQL Query -

i have been trying aspx page change sql query's order depending on html page's form. keeps giving me "parser error message: server tag not formed." how can fix code below? <% dim sortingorder = request.querystring("sortorder") %> <form id="form1" runat="server"> <asp:gridview id="gridview1" runat="server" autogeneratecolumns="false" datakeynames="id" datasourceid="sqldatasource1" emptydatatext="there no data records display."> <columns> <asp:boundfield datafield="id" headertext="id" readonly="true" sortexpression="id" /> <asp:boundfield datafield="title" headertext="title" sortexpression="title" /> <asp:boundfield datafield="summary" headertext="summary" sortexpression="summary" /...

java - Why isn't a conversion to "GenericType<?>" allowed here? -

this code causes compile error javac (but, notably, not eclipse 4.2.2!): public interface foo<t> { } class bar<t> implements foo<iterable<t>> { } class test { void test(foo<? extends iterable<? extends string>> foo) { bar<?> bar = (bar<?>) foo; } } the error javac this: foo.java:9: error: inconvertible types bar<?> bar = (bar<?>) foo; ^ required: bar<?> found: foo<cap#1> cap#1 fresh type-variable: cap#1 extends iterable<? extends string> capture of ? extends iterable<? extends string> changing cast (bar) foo (i.e. using raw type) allows code compile, changing type of foo foo<? extends iterable<?>> . edit: hilariously, simple change causes eclipse reject, javac accept: void test(foo<iterable<string>> foo) { bar<?> bar = (bar<?>) foo; } and, both eclipse , javac reject one: vo...

python - How to use igraph to plot two vertices by using non zero-based ID? -

hello new igraph. i'm trying visualize graph using python module igraph. graph g output of karger min-cut, has 2 vertices. the problem igraph far in case is, can define vertices id in edges zero-based number (0, 1, ...). cmiiw. while output of karger min-cut randomly numbered vertices. input of karger min-cut graph 300 vertices ids = 0..299, output graph has 2 vertices random ids numbered 0..299. e.g. graph g (as input igraph) has edges = [(124, 207), (207, 124)]. if try plot g, >>> import igraph >>> edges = [(124, 207), (207, 124)] >>> g = igraph.graph(edges=edges, directed=false) >>> layout = g.layout("kk") >>> igraph.plot(g, layout=layout) then resulting plot has 207 vertices, not 2 vertices expected, should [(0,1), (1,0)], that's 0 based vertices. how use igraph can plot 2 vertices using non zero-based id? thank much. update : have solved problem, suggested @gabor csardi in comment, way, >...

java - Weird syntax of an EnumMap -

an enummap defined follow: class enummap<k extends enum<k>,v> what "k extends enum<k>" mean? i can understand example: k extends number in case k type of object extend number. example integer. but k extends enum<k> mean? k extends enum<k> introduces type parameter k can bind sub-types of enum first-type parameter itself.

jsf 2 - update entity attribute through primefaces modal -

try load , update attributes datatable form embedded in primefaces modal box: 1) datatable command send user's data modal <p:commandbutton value="alterar" action="#{usuariomb.carregaralteracao(u)}" update=":usuariodesc" process="@this" onclick="dlg.show();" /> 2) loads user's attributes in modal box <p:dialog id="modaldialog" header="alterar usuário" widgetvar="dlg" modal="true" height="260" appendtobody="true" dynamic="true" > <h:form id="usuariodesc" styleclass="formtamanho"> <h:panelgrid id="#{msg.pnlidprofile}" columns="2" columnclasses="labelpanelgrid, contentpanelgrid"> <p:outputlabel value="perfil:" /> <p...

tinymce-rails configuration tinymce.yml -

i'm attempting use tinymce-rails. i'm not how setup tinymce.yml file , documentation doesn't explain much. main issue having setting plugin configurations. example, how 1 setup, insertdate_dateformat: "%y-%m-%d" for following plugin: - insertdatetime yaml below: theme_advanced_toolbar_location: top theme_advanced_toolbar_align: left theme_advanced_statusbar_location: bottom theme_advanced_buttons3_add: - tablecontrols - fullscreen plugins: - table - fullscreen - insertdatetime how can done? make sure use version 4.0 documentation , since assuming using latest version of gem. among other changes, there no longer exists advanced theme, it's called modern. furthermore, don't need specify theme_blabla anymore. try writing yaml as: toolbar_location: top toolbar_align: left statusbar_location: bottom buttons3_add: - tablecontrols - fullscreen plugins: - table - fullscreen - insertdatetime insertdate_dateformat...

jquery - MVC Razor DatePicker and TimePicker -

Image
i have form generated razor allows users edit scheduler data, , works well. one thing not understand, nor have seen before, date , time pickers automatically generated razor. to clarify, these i'm talking about: they're nice , all, can see in screenshot, do not use model values. the markup has values set in tags, controls ignore them. here's mean: as can see, values set in tags, controls not respecting values. i note in custom-built model, have these properties annotated following: //for dates... [datatype(system.componentmodel.dataannotations.datatype.date)] //for time... [datatype(system.componentmodel.dataannotations.datatype.time)] i prefer not have remove these annotations, if affects reaching solution, must done. to solve this, i'd 1 of 2 things: prevent these controls being generated in first place can use this absolutely wonderful jquery datetimepicker addon . force these controls respect , display values passed in model. all ...

How email a PHP webpage with correct format to any email client? -

Image
i having problem emailing php page correct format. page contain table made of simple <td> , <tr> , javascript making negative numbers turn in red, javascript show below: <head> <style type="text/css"> td.negative { color : red; } </style> <script language="javascript" type="text/javascript"> <!-- function makenegative() { tds = document.getelementsbytagname('td'); (var i=0; i<tds.length; i++) { var temp = tds[i]; if (temp.firstchild.nodevalue.indexof('-') == 0) temp.classname = "negative"; } } //--> </script> </head> <body> <~~~~~~~tables goes here~~~~~~~> <script language="javascript" type="text/javascript"> <!-- makenegative(); //--> </script> </body> i can display webpage correct format using internet browser: but when mail phpmailer or mailsend.exe, format becom...

php - Calling a template part from a post -

i include iframe within post in wordpress. located inside content of post, meaning cannot in post template file, otherwise either before or after. i'd add facebook plugin within posts: <div id="socialwrap"><div class="fb-like" data-href="http://onlinearizonahomes.info" data-send="true" data-width="450" data-show-faces="true" data-font="arial"></div></div> i thinking of calling template part within post <?php get_template_part( 'social' ); ?> cannot use php within post without plugin (i'd avoid using plugin this). an alternative using javascript create html in post, seems unnecessary use of javascript. what best way add html within wordpress post? you can use shortcode. add functions.php function cudjex_fbshare( $atts, $content = null ) { global $post; $link = get_permalink($post->id); return '<div id="socialwrap...

java - Modifying an Images Enum -

so friend crated enum , want shorten it. thought shorting each of file paths in strings , refrencing string pokemonpath = "pictures/menu/mainmenu/"; , being pokepath +" cosmet.png i'm not sure on how implement it. if has anyideas on how shorten more, love hear too. alos in own class file putting constants @ top not work properly, give me error. i don't work enums dont know how use them efficiently. this code import java.awt.image; import java.io.file; import java.io.ioexception; import javax.imageio.imageio; public enum images { // menu stuff. don't know how organize it. it. welcomebg("pictures/menu/mainmenu/welcomebg.png"), pokemontitlemenubg( "pictures/menu/mainmenu/pokemontitlemenubg.png"), pokemonmenuall( "pictures/menu/pokemonmenu/pokemonmenuall.png"), pokemonmenucontinue( "pictures/menu/pokemonmenu/pokemonmenucontinue.png"), pokemonmenucontinueselected( "pictures...