Posts

Showing posts from April, 2014

xml - Error: Invalid content was found starting with element -

i having trouble getting files validate. here errors getting. 4: 14 cvc-complex-type.2.4.a: invalid content found starting element 'airportlist'. 1 of '{"":airport}' expected. 47: 15 xml document structures must start , end within same entity. i post both xml document code , xsd schema below. i'm new this, i'm not sure i'm doing wrong. have changed formatting of files around still same errors. <?xml version="1.0"?> <airportlist xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:nonamespaceschemalocation="simple_apoole33.xsd"> <airportlist> <airport> <name>abbotsford international airport</name> <community>abbotsford</community> <province>british columbia</province> <passengers>15</passengers> </airport> <airport> <name>atlin airport&l

javascript - Render cherrypy's template with id/hash -

how render page , go specific id? right have following function code: @cherrypy.expose @require def page(): tmpl = lookup.get_template('page.html') return tmpl.render() however, page.html have several subpages, can access through url mydomain.com/page#someid . is there way render template go directly id? i think mixing ideas, # part of url client duty focus in specific element id. nevertheless, suppose want dynamically embed chunks of particular part of page trough javascript, can think on 2 possibilities: one, compose full page template different ids different sub-templates, easy if using template module, mako , , make cherrypy handler return indivudual parts, of course supposing in control of content of page , ids not dynamic (generated db or something) , main site bunch of includes . @cherrypy.expose def page_part(section): tpl_name = 'page_%s.html' % section # validate template exists, then: tmpl = lookup.get_template(t

sql - Use the foreign key that a query selects to get data within the same query -

i have issue query trying build. idea have 3 tables 2 have foreign keys. want make query selects foreign key table , uses same key data key b. so this: select id, foreignkey1 tablea (select id tableb id = foreignkey1); but somehow not able or find documentation it. this simple inner join : select * tablea inner join tableb b on a.foreignkey1 = b.id

jquery - How to test notification implemented using signal r -

i have used signal r implement face book kind of notification in mvc 4 application. referring http://www.codeguru.com/csharp/.net/sending-notifications-using-asp.net-signalr.htm with generated proxy code. have notification count bubble (span) in lay out page , there add notification page have text box , button . on click of button calling hub method broadcast message.there sending notification client using client.all.briadcastnotification() i have 2 pages opened. 1 home page , add notification page have typed message broadcast.when clicked on send button notification count bubble(span) got updated on add notification page. in other page ((home page) notification count bubble(span) not getting updated. need update pages ?? also please me how can test whether notification message sending clients .i new signal r , mvc , stackoverflow well.

python 3: lists dont change their values -

so trying change bunch of list items random percentage using loop. import random rdm list = [1000, 100, 50, 25] def change(): item in list: item = item + item*rdm.uniform(-10, 10) change() print(list) (also dont how paste multiple lines of code did them 1 one, appreciate too) , when prints list consists of numbers started with. your item = .... line, stands, associates new object name item in function's namespace. there no reason why operation change content of list object previous value of item extracted. here listing changes list in-place: import random lyst = [1000,100,50,25] def change(lyst): i, item in enumerate(lyst): item = item + item * random.uniform(-10, 10) lyst[i] = item print(lyst) change(lyst) print(lyst) the lyst[i] = ... assignment key line changes list's content. of course can collapse 2 assignments 1 line if want: lyst[i] = item = ..... or can omit reassignment item if you're not going use aga

sql - Missing keyword from SELECT CASE -

i unsure wrong sequence of case statements. have looked online , syntax seems correct getting error missing keyword. appreciated! case when = '1' when sequence_number = 5 9 when sequence_number = 6 9 end when = '2' when sequence_number = 5 9 when sequence_number = 6 9 end when = '3' when sequence_number =7 9 when sequence_number =8 9 end else t.number end number the simplest option seem be: case when (a in (1,2) , sequence_number in (5,6)) or (a in (3 ) , sequence_number in (7,8)) 9 else t.number end

c# - How to deserialize JSON to a object with type Interface -

i using asp.net mvc. have model property type interface. public class testmodel : basemodel { public(testmodel) {} public int status {get;set;} public itestinterface testinterface {get;set;} } i not able desterilize object in controller when passing view json. javascriptserializer jsserializer = new javascriptserializer(); list<testmodel> lstmodel = jsserializer.deserialize<list<testmodel>>(strjsondata.tostring()); thanks, kron

python - Divide all rows in a pandas dataframe by a specific row -

i have pandas dataframe below: sample_name c14-cer_mean c16-cer_mean c18-cer_mean c18:1-cer_mean 0 1 1 0.124749 0.285659 35.302029 8.173144 1 1 10 0.332976 0.656197 39.220933 6.446620 2 1 13 0.227423 0.272440 26.866943 5.763723 3 1 14 0.128359 0.604903 29.848169 6.801633 4 1 5 0.204000 0.242652 21.354158 4.637632 5 1 6 0.122697 0.412868 25.168258 5.866785 6 1 9 0.161679 0.569781 28.707720 6.525267 7 blank 0.408713 0.526573 0.531430 0.111025 i want dataframe values in rows have been divided values in row sample_name "blank" (normalizing sample "blank"). how can achieve in pandas? you can select rows , slice df using loc , call div , pass last row using iloc[-1] : in [58]: df.loc[:,

c# - Using the activeX Control "AcroPDF.dll" my application works fine, but crashes on startup if adobe acrobat is not installed -

i have application adds text pdf files, , have axacropdf1 preview panel borrows acrobat show status of pdf file, not necessary function of program, so i'd have program still start when acrobat not installed albeit more limited functionality , , user wont have preview panel fine. how can this? the thing think try adding catch/exception when this.axacropdf1 initializing when program starts, allows me put message popup adobe reader required, program still crashes after that, have program start regardless, , not call on when adobe not installed, or other suggestions guys have application still function or without adobe. i know how check if adobe installed, don't know how apply result program. the catch exception on initializing gives following error (i'm noob not giving information here): system.runtime.interopservices.comexception (0x80040154): class not registered (exception hresult: 0x80040154 (regdb_e_classnotreg)) @ system.windows.forms.unsafenativemeth

php - Wordpress IF statement not working -

i have if statement stating following... <?php if (empty($data['footer_text'])) { echo'<p>&copy;&nbsp;'; print(date("y")); echo'<span class="sep"> | </span><a href="'; echo get_settings('home'); echo'" title="'; bloginfo( 'name' ); echo'" rel="home">'; bloginfo( 'name' ); echo'</a></p>'; } else{ echo'<p>'; global $data; echo $data['footer_text']; echo'</p>'

php - Shorten copied text with javascript to protect blog from copying articles -

i have added code functions.php of wordpress blog: function add_copyright_text() { if (is_single()) { ?> <script type='text/javascript'> function addlink() { if ( window.getselection().containsnode( document.getelementsbyclassname('post')[0], true)) { var body_element = document.getelementsbytagname('body')[0]; var selection; selection = window.getselection(); var oldselection = selection; var pagelink = "<br /><br /> read full forex article here: <?php the_title(); ?> <a href='<?php echo get_permalink(get_the_id()); ?>'><?php echo get_permalink(get_the_id()); ?></a>"; //change if var copy_text = selection + pagelink; var new_div = document.createelement('div'); new_div.style.left='-99999px'; new_div.style.position='absolute'; body_element.appendchild(new_div ); new_div.innerhtml = copy_text ; selection.sel

algorithm - Understanding a* for Java / processing -

i trying learn a* algorithm, dijkstra 1 too. yesterday found working example processing, thought coded. looked @ content of project didn't see method steps or save way target in array... here questions: to implement such pathfinding system game pacman, there needs array, steps or way saved right? because don't know yet how pathfinding used... how possible enemy (ghost) moves target looking @ array? if 1 wants see code of algorithm: int[][] findpath () { int[][]done=asarray(); done[fr][fc] = 0;int counter = 0;while (true) { boolean foundone = false; (int = 0; < copyarray.length; i++) { (int j = 0; j < copyarray[0].length; j++) { if (done[i][j] == counter) { foundone = true; if (isvalid(done, i-1, j, counter+1)) done[i-1][j] = counter + 1; if (isvalid(done, i+1, j, counter+1)) done[i+1][j] = counter + 1; if (isvalid(done, i, j-1, counter+1)) done[i][j-1] = counter + 1; if (isvalid(done, i, j+1, counter+1)) done[i][j+1] = counter + 1; } } } counter ++; if (!fou

binary - View Perl Variables as Bytes/Bits -

disclaimer: it's been ages since i've done perl, if i'm asking/saying stupid please correct me. is possible view byte/bit representation of perl variable? is, if like my $foo = 'a'; i know (think?) computer sees $foo 0b1100010 is there way perl print out binary representation of variable? (not asking practical purpose, tinkering around old friend , trying understand more did in 1997) sure, using unpack : print unpack "b*", $foo; example: % perl -e 'print unpack "b*", "bar";' 011000100110000101110010 the perldoc pages pack , perlpacktut give nice overview converting between different representations.

css - Sass-gulp error importing whole directory -

i'll start saying i've looked hours , haven't found solution works me. i'm trying away compass , switch sass company's website, , i'm running issue sass doesn't recognize directories; "file not found or unreadable" error. i've tried compile using vanilla sass, gulp-sass, , gulp-ruby-sass, , exact same error on of them. here's folder structure: - css - sass - variables - _colors.scss - _type.scss (... etc.) - abstractions - base - components - gulpfile.js my styles.scss file looks (there's bunch of comments @ top): @import "variables/**/*"; @import "abstractions/**/*"; @import "base/**/*"; @import "components/**/*"; and gulpfile.js looks this: var gulp = require('gulp'), sass = require('gulp-sass'); gulp.task('sass', function() { gulp.src('sass/**/*.scss') .pipe(sass().on('error', sass.logerror)) .pipe(

Spring Boot 1.3.1.RELEASE + IntelliJ Debug mode -

i have built spring data rest app spring boot in memory security, gradle: dependencies { runtime("mysql:mysql-connector-java") compile("org.springframework.boot:spring-boot-starter") compile("org.springframework.boot:spring-boot-starter-logging") compile("org.springframework.boot:spring-boot-starter-data-rest") compile("org.springframework.boot:spring-boot-starter-data-jpa") compile("org.springframework.boot:spring-boot-starter-security") compile("org.springframework.boot:spring-boot-devtools") compile("org.projectlombok:lombok:1.14.8") compile("com.mysema.querydsl:querydsl-jpa:3.7.0") compile("com.mysema.querydsl:querydsl-apt:3.7.0") compile("org.apache.httpcomponents:httpclient:4.5.1") testcompile("org.springframework.boot:spring-boot-starter-test") } all works fine except intellij debug mode - when try debug main class: @configuration @enableautoconf

python - django debug doesn't print set because of unicode chars (python3) -

update : i'm trying find example easy possible hint! missed, 1 person isn't show on list too! , when changed it's name - ok - problem unicode char, if there's non-ascii char in string debug, logger doesn't print @ all. in python2 there error, in python3 unicode default doesn't thought - somehow doesn't work. if use logger.debug('1: %r' % ascii(suspected)) it's want <person: tadeusz koÅšciuszko> instead of <person: tadeusz ko\\u015aciuszko> logger.debug('begin') suspected = person.objects.all() logger.debug('0') try: logger.debug('1: %r' % suspected) except: logger.debug('crash1') sus in suspected: logger.debug('2: %r' % sus) try: logger.debug('3: %r' % suspected) except: logger.debug('crash4') logger.debug('end') result: 2016-01-16 08:53:54,665 debug views begin 2016-01-16 08:53:54,667 debug views 0 2016-01-16 08:53:54,

android - Saving Camera Bitmap to Storage, and Setting Image with Bitmap -

i know basics on how take picture , set imageview. photo = (bitmap) data.getextras().get("data"); imageview.setimagebitmap(photo); i want little more that. i saving folder on sd card. have done this: // intent intent intent = new intent(mediastore.action_image_capture); intent.putextra(mediastore.extra_output, uri.fromfile(file)); startactivityforresult(intent, camera_request); here next question: not sure how this: i'd next: next time come activity , i'd check if image exists , assign imageview . last days faced issue in 1 of applications. i'll try here explain little bitte have done. try save picture full path storage area or sharedpreferences. next time if call activity check if picture exists , if can use it. prepare in xml layout imageview visibility="gone" , if point (2.) true can change visibility visible , set image in view. if point (2.) false switch camera view (surfaceview) in order take new picture

scala - Spark: save a output HashSet to a file -

i have following code: val myset: hashset[string] = hashset[string]() val mysetbroadcastvar = sc.broadcast(myset) val output = input.map { t => if (t.geta()!= null) { stsetbroadcastvar.value.add(t.geta()) } }.count() sc.parallelize(mybroadcastvar.value.tolist, 1).saveastextfile("mysetvalues") then file mysetvalues empty though shouldn't be. because mysetvalues saved before output computed? how fix problem? thanks! broadcast variables share read-only data across tasks , stagesin efficient manner tasks not supposed modify broadcast variables updates aren't reflected either in other nodes , aren't transported driver. you need accumulators purpose. example (from spark-shell) scala> val acc = sc.accumulablecollection(scala.collection.mutable.hashset[string]()) acc: org.apache.spark.accumulable[scala.collection.mutable.hashset[string],string] = set() scala> val names=sc.parallelize(seq("aravind","sam",&

c++ - Updating QGridLayouts -

hi guys i'm coding game studies , i've big problems (my leg injured , couldn't go lessons). my job simple battleships game in c++, qt. i'm in point logic code done, gui big mess. here's code gui .cpp file: #include <qtwidgets> #include "dialog.h" dialog::dialog() { creategraczbox(); createkomputerbox(); createodpowiedz(); qgridlayout *mainlayout = new qgridlayout; mainlayout->addwidget(graczbox , 0 , 0 ); mainlayout->addwidget(komputerbox , 0 , 1 ); mainlayout->addwidget(odpowiedz , 0 , 2 ); setlayout(mainlayout); setfixedsize(800,400); setwindowtitle(tr("battleships!")); } void dialog::creategraczbox() { graczbox = new qgroupbox(tr("gracz")); qgridlayout *layout = new qgridlayout; (int j = 0; j < numgridrows; ++j) { labels[j] = new qlabel(tr("%0").arg(j+1)); layout->addwidget(labels[j], 0 , j + 1 , qt::alignleft);

php - Overide Magento Enterprise Core Observer Method -

im trying on ride several methods located in enterprise_catalog_model_observer class. in core config observer defined <catalog_product_save_after> <observers> <catalog_product_save_custom_redirect> <class>enterprise_catalog/observer</class> <method>saveproductcustomredirect</method> </catalog_product_save_custom_redirect> </observers> </catalog_product_save_after> in enxtension app/code/local/extensioname/redirects/etc/config.xml <?xml version="1.0"?> <config> <modules> <extensioname_redirects> <version>0.1.0</version> </extensioname_redirects> </modules> <global> <models> <extensioname_redirects> <class>extensioname_redirects_model_observer</class&

How can I write a program in Python Dictionary that prints repeated keys values? -

this input: dic1 = {'a':'usa', 'b':'canada', 'c':'france'} dic2 = {'c':'italy', 'd':'norway', 'e':'denmark'} dic3 = {'e':'finland', 'f':'japan', 'g':'germany’} i want output below: {'g': 'germany', 'e': [‘denmark’,’finland'], 'd': 'norway', 'c': ['italy’,'france', 'f': 'japan', 'b': 'canada', 'a': 'usa'} that programing - think steps need desired results, , write code perform these steps, 1 @ time. a funciton can it: def merge_dicts(*args): merged = {} dct in args: key, value in dct.items(): if key not in merged: merged[key] = [] merged[key].append(value) return merged

c++ - Error: expected constructor, destructor, or type conversion before '(' token 2 -

i see common error, didn't see response quite fit. trying compile simple c++ application using dec-c++ under win 10. code included chinese usb i/o module, , need recompile prompts , comments in english. first part easy, google translate, project won't compile, giving subject error. the errors output when compiling included function called main.cpp. offending function below. i sure appreciate here! dave #ifndef _mc100_h #define _mc100_h extern "c"{ // 2013-3-27 #ifndef winapi #define winapi __stdcall #endif #define mc100_porta 0 #define mc100_portb 1 #define mc100_portc 2 // error v here, in _declspec lines _declspec(dllimport) int winapi mc100_scan_device(void); _declspec(dllimport) int winapi mc100_open(int id); _declspec(dllimport) int winapi mc100_close(int id); _declspec(dllimport) int winapi mc100_set_pin(int id, int pin); _declspec(dllimport) int winapi mc100_clear_pin(int id, int pin); _declspec(dllimport) in

My javascript is not working (w jquery as well) -

i not able javascript work html: <div id="tomato"> <body> <button id="totato">total</button> </body> </div> javascript: $(document).ready(function() { $("totato").click = potato(); function potato() { $("tomato").css("background", "red"); } }) you missing # => id selector event binding should implement using .on() expect first argument event , second argument function expression(callback function) note have parenthesis () around function name invoke function when line executed. $(document).ready(function() { $("#totato").on('click', potato); function potato() { $(this).css("background", "red"); } }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <div id="tomato"> <body> <

wordpress - Woocommerce How to hide product tab -

i'm trying hide or remove tab want keep product description. there way this? https://www.absolutept.com/product/electric-stimulation-machine-ev906/ see how word "description" appears - want remove , dot in front of keep else. thanks in advance. you have remove code snippet: <ul class="tabs wc-tabs"> <li class="description_tab active"> <a href="#tab-description">description</a> </li> </ul> that should solve problem.

ios - Can I use Apple Universal Links with HTTP server? -

i have not been able confirm anywhere, maybe here can. know when targeting ios 9+ , using https 1 can implement universal links plaintext app-site-association-file. i know, when supporting handof/shared web credentials, file needs signed. what i'm interested in whether universal links work signed file avaiable via http? for wondering - no cannot. when using signed file (which requirement handoff , shared web credentials in ios 8), connection still needed accesible via https. reference docs : the file must meet following requirements: the file must hosted on https:// site valid certificate (for example, safari must not issue certificate warning when viewing site). the file must not use redirects. the file must have mime type application/pkcs7-mime. the file must cms signed valid tls certificate.

java - Apache POI - Iterating over columns in excel (XSSF) -

this question has answer here: apache poi - java - iterating on columns in excel 1 answer i want program read excel column top bottom, not left right, doing right now. unfortunately, cannot find in documentation lets me this. i have excel file looks this: col1 col2 col3 col4 ----------------------------- row1 | 2,3,1 _ 1 w row2 | 3,2,7 _ 2 x row3 | _ _ 3 y row4 | 4,9 _ 4 z i'm writing values (using xlwt) in column 2 this: col1 col2 col3 col4 ----------------------------- row1 | 2,3,1 x,y,w 1 w row2 | 3,2,7 y,x 2 x row3 | _ _ 3 y row4 | 4,9 z 4 z essentially, column 3 , column 1 being compared, , if cell (1,1) has values matched in column 3, column 4's values (which correspond column

r - finding the previous Monday -

i'm looking way find date object previous calendar week's monday. example, today 1/15/2016; need build function return '2016-01-04 utc' the question asks "previous calendar week's monday". assume below means want monday on or before input date. note better use "date" class since times not needed , "date" class has no time zone avoids potential time zone errors associated "posixt" classes. there nextfri function in zoo vignette, zoo quickref vignette can use basis of similar function. make these changes (1) ceiling replaced floor , (2) 5 (friday) replaced 1 (monday) , (3) add origin= argument to as.date -- if zoo loaded default origin provided origin= argument optionally omitted. this function uses base r , vectorized. accepts "date" class vector , returns "date" class vector of dates monday on or before respective input dates. lastmon <- function(x) 7 * floor(as.nume

php - Visitor CAPTCHA Image Has An Error Revolving Around "fopen", "fputs" & "fclose" -

i've made simple captcha displays total number of visitors of website using 4 files: counter.php , counter.png , counter.txt , , visitor-ip.txt . counter.txt file keeps total number of visitors (1, 2, 10, 20, 140, etc). visitor-ip.txt file keeps track of of visitor's ip address, if return won't counted again. counter.php writes total number of visitors counter.png file. last night every thing worked. won't. 3-4 errors , when check indicated lines, seems normals. errors seems revolve around fopen , fputs , fclose . errors warning: fopen(visitor-ip.txt): failed open stream: permission denied in /users/matthew/sites/counter/counter-1/counter.php on line 24 warning: fputs() expects parameter 1 resource, boolean given in /users/matthew/sites/counter/counter-1/counter.php on line 30 warning: fclose() expects parameter 1 resource, boolean given in /users/matthew/sites/counter/counter-1/counter.php on on line 31 fatal error: call undefined function createcounterimag

java - How to reset Scanner? -

i want read text file , put each line in string (array of strings). requires scanning file twice, 1 figure out how many line there , time create array of strings of size. throws error. , reset method doesn't seem work. filereader read = null; try { read = new filereader("modulesin.txt"); //scan through , make array of strings - each line scanner scan = new scanner(read); while(scan.hasnextline()) { numofmods++; scan.nextline(); } scan.reset(); lines = new string[numofmods]; for(int = 0; < numofmods; i++) lines[i] = scan.nextline(); this sinppet of code relevant. skip using standard array... it's waste of time scan through file , scan through again. use arraylist instead has dynamic size , convert standard array afterwards. bufferedreader in = new bufferedreader(new filereader("path/of/text")); string str;

c# - Create a property name with the same name as a Keyword -

this question has answer here: use long reserved word variable name in c# 5 answers i'm sure question has been asked before, can't find answer need. i creating assembly using c# , 1 of it's structs named need. i'm trying following: internal struct need { internal need how { { return how; } } internal need true { { return true; } } } i want create new property named true. need.true obvious ide doesn't trying create property has same name keyword. the obvious fix change name else, truth, heart tells me that's not should do. this peaked interest. can theoretically created variable (or whatever) , assembly should able figure out variable referring based on context , scope. if like: (pseudo code) create int number create need.int number or

Unable to save the last xml file php -

i new php, , have written code work amazon api. when request information api, receive it, unable sort through xml. here error: fatal error: call member function children() on null in j:\xampp\htdocs\phillip\src\marketplacewebserviceproducts\samples\csv_prep.php on line 117 here code: if(is_array($xmlfiles)){ foreach($xmlfiles $xmlfile){ $xml = simplexml_load_file($xmlfile); foreach($xml->getmatchingproductforidresult $items) { //line 117 -> if(isset($items->products->product->attributesets->children('ns2', true)->itemattributes->listprice->amount) !== false) { $amount = $items->products->product->attributesets->children('ns2', true)->itemattributes->listprice->amount }else{ $amount = '0.00'; } } } } the tag in xml trying value of looks this: <ns2:amount>9.99</ns2:amount> it

jquery - Angular2 - Delete Row Or Column Where the delete button was clicked -

we can delete using jquery, can use angular this? <tr> <td *ngfor="#lev of rubric?.criteria[0].levels"> <button class="close removelevel" (click)="onclickremove($event)">&times;</button> <input type="text" class="form-control" placeholder="performance level" #level="ngform" [(ngmodel)]="lev.level" ngcontrol="level" /> </td> </tr> and in component.ts: onclickremove($event) { } how can access row or cell element here, event raised? from question , want delete row when delete button pressed . in angular way must doing remove record model . pass row id unique ng-controller , remove model. so if have below <td *ngfor="#lev of rubric?.criteria[0].levels"> &

ruby on rails - @Simple_form rendering but not showing *SOLVED* -

i switched rails , started on first application. im struggling bit forms , bootstrap however! says form rendering , im not receiving errors, none of form code showing. im running rails 4.2.5 latest bootstrap-sass , simple_form versions. im not sure whether bootstrap css working @ either, doesnt appear be. been trying different versions, installing , uninstalling , changing code hours canẗ seem working. immensely grateful help! kind regards, jens form (_form.html.erb) code; <%= simple_form_for @book, html: ({ cĺass:'form-horizontal'}) |f| %> <div class = "field"> <%= f.input :title, label: "book title" %> <%= f.input :description %> <%= f.input :author %> <%= f.button :submit %> <% end %> i renamed application.css .scss, contains only; @import "bootstrap-sprockets"; @import "bootstrap"; application.js contains: //= require jquery //= require jquery_ujs //= require bootstrap-sp

android - syntax error while compiling SQLite DB (creating a table) whats wrong with my query? -

public void oncreate(sqlitedatabase db) { string query = "create table " + table_info + "(" + column_id + " integer primary key " + column_date + " text " + column_docname + " text " + column_symp + " text " + column_digno + " text " + column_meds + " text " + ");"; db.execsql(query); what wrong this? getting androidruntime: fatal exception: main android.database.sqlite.sqliteexception: near "date": syntax error: , while compiling: create table info(_id integer primary key date text docname text symp text digno text meds text ); error. please help you have comma missing in query after each column, change query string below: string query = "create table " + t

android - Using shared element transitions from a non-activity class to an activity class -

i have non-activty class (precisely recyclerview adapter holding cardviews), trying use "authentic motion" transition cardview final activity using shared image element. implemented between 2 activity classes non-activity class activity class, unable so? here's code (recyclerviewadapter.java): public class rvadapter extends recyclerview.adapter { public static class personviewholder extends recyclerview.viewholder { cardview cv; textview personname; textview personage; imageview personphoto; textview myid; front ft = new front(); personviewholder(view itemview) { super(itemview); personname = (textview)itemview.findviewbyid(r.id.person_name); personage = (textview)itemview.findviewbyid(r.id.person_age); personphoto = (imageview)itemview.findviewbyid(r.id.person_photo); myid = (textview)itemview.findviewbyid(r.id.idtag); cv = (cardview)itemview.findviewbyid(r.id.cv); cv.setuse

how to install Emacs predictive-mode in Aquamacs? -

i'm trying install emacs predictive-mode, when predictive-mode , loading completion-ui': old-style backquotes detected!` then get: wrong type argument: listp, word backtrace: http://pastebin.com/42nkinyp looks completion-ui might require tiny fix adjust newer emacs you're using. report author of completion-ui (or predictive-mode).

How can i customize GenerateChangePhoneNumberToken in ASP.NET Identity? -

i need customize generatechangephonenumbertoken() , generateemailconfirmationtoken() in asp.net identity 2. how implement it? need generate custom token. can it? no, cannot except replacing complete asp.net identity code yourself. tokens generated , validated according rfc 6238 6 digits used. can refer source code here

verilog - how to force data in design instead of using testbench -

hi guys wondering if there way force bit in design instead of using testbench? verilog code single port ram below how force ram[address] 1000 instead of using testbench? module ram(clk, rst, w, r, data, address, read, read_out); parameter length = 4; parameter depth = 8; input clk, rst, r, w; input [length-1:0] data, address; output [length-1:0] read; output reg[length-1:0] read_out; reg[length-1:0] ram [depth-1:0]; assign read = ram[address]; always@(posedge clk) begin if (!rst) begin if(w) ram[address] <= data; else if (r) read_out <= ram[address]; end else begin if (w) ram[address] <= data; end end endmodule there procedural continuous assignment type of statements have precedence on procedural statements. these assign statements inside always block. referring example in systemverilog lrm 1800-2012 section 10.6, the assign procedural continuous assignment statement shall override procedural assignments variable. deassign

c++ static methods and inheritance in templates with overloading -

it's first post here, have looked answer days, have ask. complex construction. embed spidermonkey javascript engine in illustrator plugin. illustrator has complicate , inconsistent api. in case have call method having short type parameter: namespace ai { ... typedef signed short int16; ... }; the method referred pointer in struct: struct aidocumentsuite { ... aiapi aierr (*getdocumentrulerunits) ( ai::int16 *units ); ... }; but, enum source of parameter: enum aidocumentrulerunitvalue { kunknownunits = 0, /** inches */ kinchesunits, /** centimeters */ kcentimetersunits, /** points */ kpointsunits, /** picas */ kpicasunits, /** millimeters */ kmillimetersunits, /** pixels */ kpixelsunits, /** q units */ kqunits }; i have wrapped these in classes in order have javascript objects managed spidermonkey. have following working call somewhere in code (a bit simplified, cleaned of tests verifications): ai::