Posts

Showing posts from September, 2013

ruby on rails - OpenDocument Spreadsheet corrupt in Microsoft Excel -

i using gem write opendocument spreadsheet ( rspreadsheet ) once data written let user download it. spreadsheet works fine in openoffice calc , numbers mac. however, when try open spreadsheet in microsoft excel tells me spreadsheet corrupt. happens when write data it. can open via ruby , save , work fine. once write data it, becomes corrupt. i have tried gem ( rubiod ) , able open spreadsheet in excel after excel had 'recover' spreadsheet. in doing removed formulas , formatting. worse in openoffice , numbers although did retain formulas. i need user able download spreadsheet in ever program choose. have no idea why excel says sheet corrupt , have tried wrap head around hours. the spreadsheet saved ods extension , downloaded using mime type of application/x-vnd.oasis.opendocument.spreadsheet , character set of utf-8 examples: original = rspreadsheet.open 'blank.ods' sheet = original.worksheets 1 sheet.a1 = 'foobar' # without this, excel can open sp...

"Java(TM) Platform SE binary has stopped working" error with Tomcat server -

the following error message appears while running tomcat web server: "java(tm) platform se binary has stopped working problem caused program stop working correctly. windows close program , notify if solution available." faulting application path: c:...\jdk1.6.0_38\bin\java.exe faulting module path: c:..\jdk1.6.0_38\jre\bin\dt_socket.dll os: windows 8 (64 bit). java: 1.6.0_38 (64 bit). tomcat: 7.0.25 . this known bug java 1.6. see: http://bugs.java.com/view_bug.do?bug_id=6810745 even latest 1.6.0.45 has same one. i have been able replace jdk/jre 1.7.0.80 in issue appears have been resolved. wasn't able upgrade 1.8 specific application had issues it. keep in mind both 1.6 , 1.7 no longer supported. of writing latest 1 1.8. just make sure download appropriate 32 or 64 version. can find previous versions here: http://www.oracle.com/technetwork/java/javase/archive-139210.html

command line - C# Reading Paths From Text File Says Path Doesn't Exist -

this question has answer here: what's fastest way read text file line-by-line? 9 answers i'm developing small command line utility remove files directory. user has option specify path @ command line or have paths being read text file. here sample text input: c:\users\mrrobot\desktop\delete c:\users\mrrobot\desktop\erase c:\users\mrrobot\desktop\test my code: class program { public static void main(string[] args) { console.writeline("number of command line parameters = {0}", args.length); if(args[0] == "-tpath:"){ clearpath(args[1]); } else if(args[0] == "-treadtxt:"){ readfromtext(args[1]); } } public static void clearpath(string path) { if(di...

Replacing AngularJS Route with UI Router -

i'm trying replace angularjs route ui router since seems uses. i'm getting started , wondering how replace following code $stateprovider: $routeprovider .when('/login', { templateurl: 'views/login.html', controller: 'loginctrl' }) .when('/dashboard', { templateurl: 'views/dashboard.html', controller: 'dashboardctrl' }) .otherwise({ redirectto: '/login' }); replace when state : $stateprovider .state('state1', { url: "/state1", templateurl: "partials/state1.html" }) more details here: https://github.com/angular-ui/ui-router

java - Give (an) example(s) of something bad that happens with a 'catch(Exception)' clause -

this follow question this one . it seems accepted doing broad 'catch (exception)' bad idea. the reasoning typically 'you must handle exception properly' , 'catch can handle' , few other generic sounding arguments. those generic answer sound reasonable, don't satisfy me. let me concrete. here's typical bit of code supposed 'bad'. try { ... something... } catch (exception e) { log(e); //leave trace debugging return ...a value context can deal with... } a sceptical mind can remain unconvinced not handling exception, (which blow entire program), better outcome handling in generic way. so specific , convincing example(s), code snippet(s), of bad happens because of supposedly broad catch clause 1 above. ps: 1 think question in other languages java, since want specific examples, specific exceptions might raised java program , jre. ps2: interested in examples of exception in fact subtype of java.lang.exception , not more b...

How to add swipe functionality on Android CardView? -

i have single cardview contains 2 textviews , 2 imageviews. want able swipe left , right "dismiss". want swipe right send intent can done later. now, want able dismiss cardview swiping left or right. want animation of swiping. i tried using romannurik's swipedismisstouchlistener cardview not respond swiping. if has better solution romannurik's custom listener, please share. here's cardview layout: <android.support.v7.widget.cardview android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/generate" map:cardcornerradius="@dimen/_3sdp" map:cardelevation="@dimen/_8sdp" android:id="@+id/restaurantcontainer"> <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical"> <linearlayout ...

java - Update elements in a JSONObject -

lets gave jsonobject { "person":{"name":"sam", "surname":"ngonma"}, "car":{"make":"toyota", "model":"yaris"} } how update of values in jsonobject? like below : string name = jsonarray.getjsonobject(0).getjsonobject("person").getstring("name"); name = "sammie"; use put method: https://developer.android.com/reference/org/json/jsonobject.html jsonobject person = jsonarray.getjsonobject(0).getjsonobject("person"); person.put("name", "sammie");

jquery - Revert mmenu back to the panel with the selected item when closed -

i've been tooling around jquery mmenu plugin found here mmenu . the menu render correct sub-panel long add class="selected" appropriate li tag. i'm looking way revert panel upon closing if user happened navigate sub-menus without making selection. thus, next time open menu, it's set panel opened when page loaded. if use demo , open menu, click arrow about us sub-menu, click arrow the team sub-menu, don't make selection , click hamburger icon close menu. upon opening menu again, you're on the team menu rather menu displayed when page first loaded. know how revert menu top level menu on closing using closeallpanels(), can't figure out how panel original selected li. any suggestions? it looks can accomplished following: menu.bind( "closed", function() { menu.openpanel($('li.mm-selected').closest('.mm-panel')); });

java - Method level generic return types in interfaces -

do method level generics in interfaces (for return types) ever make sense? have use? example:- public interface abx { public <t> t fx(string p); } i make generic class-level so public interface abx<t> { public t fx(string p); } is there situation @ want generic method-level in interfaces/abstract classes (for return types). method level generics have utility. have bind generic type parameter somehow typically such method have generic argument, class, , return generic value. example doesn't this, it's difficult see value of generic type parameter. you can see examples of them on place - ones come across in jackson databinding class objectmapper - https://fasterxml.github.io/jackson-databind/javadoc/2.2.0/com/fasterxml/jackson/databind/objectmapper.html , such <t> t readvalue(inputstream is, class<t> returntype) so, value here objectmapper not generically typed class allows me bind any class (provided can understand c...

regex - How can I remove all spaces between two XML tags? -

i have perl script want amend remove spaces between 2 xml tags. example xml: <tag> <tag1><tag2>abc 123 def 456 ... </tag2></tag1><tag1><tag2>xyz 987 ... </tag> i'd remove occurrences of spaces between tag2 tags. tried following: $vmodstrg =~ s/(<tag2>(.*?)<\/tag2>)/<tag2>zzzzzz<\/tag2>/g; but replaces whole match zzzzz . how can tell perl remove spaces match occurrences of tag2 ? regular expressions bad tool job, because parsing xml requires recursion. can newer versions of regex, @ best leads complicated , hard read regular expressions, , ones edge cases they'll break. see: why it's not possible use regex parse html/xml: formal explanation in layman's terms so use parser - remove 'spaces between <tag2> elements': #!/usr/bin/env perl use strict; use warnings; use xml::twig; #parse data our "data" filehandle. #you might want "parsefile(...

c++ - Function overloading for const char*, const char(&)[N] and std::string -

what want achieve have overloads of function work string literals , std::string , produce compile time error const char* parameters. following code want: #include <iostream> #include <string> void foo(const char *& str) = delete; void foo(const std::string& str) { std::cout << "in overload const std::string& : " << str << std::endl; } template<size_t n> void foo(const char (& str)[n]) { std::cout << "in overload array " << n << " elements : " << str << std::endl; } int main() { const char* ptr = "ptr const"; const char* const c_ptr = "const ptr const"; const char arr[] = "const array"; std::string cppstr = "cpp string"; foo("string literal"); //foo(ptr); //<- compile time error foo(c_ptr); //<- should produce error foo(arr); //<- ideally should produce error...

ms access - Invalid argument Error when attempting UPDATE query on linked SharePoint list -

i'm running update query access 2010 on linked sharepoint 2013 list, getting invalid argument error. my access db 200 mb, have tried compacting , repairing db. query "runs" when select "view"--the error appears when click "run". query i'm running goes like: update sp_table inner join access_table on sp_table.id1 = access_table.id1 set sp_table.field1 = access_table.field1, sp_table.field2 = access_table.field2, --etc... (sp_table.field1 <> access_table.field1 , sp_table.id1 = access_table.id1) or (sp_table.field2 <> access_table.field2 , sp_table.id1 = access_table.id1) or --etc... ; this question seems have same problem, , solution seems plausible, they're both distinctly lacking in detail. i'm not sure how view pk on sharepoint list, or how tell if it's problem. any ideas on how resolve error? i able resolve error, though i'm still not sure causing it. went through of fields in where clause, ,...

c# - Invalid length for a Base-64 char array error -

as title says, getting: invalid length base-64 char array. so doing construct email delivery using below method: smsg += "<br><b>to complete registration, verify email</b>" + "<a href=" + siteurl + "?usenamw=" + encrypt(username.trim()) + "><br>here!</a>"; the encrypt method looks this: private static string encrypt(string cleartext) { string encryptionkey = "makv2spbni99212"; byte[] clearbytes = encoding.unicode.getbytes(cleartext); using (aes encryptor = aes.create()) { rfc2898derivebytes pdb = new rfc2898derivebytes(encryptionkey, new byte[] { 0x49, 0x76, 0x61, 0x6e, 0x20, 0x4d, 0x65, 0x64, 0x76, 0x65, 0x64, 0x65, 0x76 }); encryptor.key = pdb.getbytes(32); encryptor.iv = pdb.getbytes(16); using (memorystream ms = new memorystream()) { using (cryptostream cs = new cryptostream(ms, encryptor.createencryptor(), cryptostr...

scala - ClassNotFoundException for Spark job on Yarn-cluster mode -

so trying run spark job on yarn-cluster mode kicked off via oozie workflow, have been encountering following error (relevant stacktrace below) java.sql.sqlexception: error 103 (08004): unable establish connection. @ org.apache.phoenix.exception.sqlexceptioncode$factory$1.newexception(sqlexceptioncode.java:388) @ org.apache.phoenix.exception.sqlexceptioninfo.buildexception(sqlexceptioninfo.java:145) @ org.apache.phoenix.query.connectionqueryservicesimpl.openconnection(connectionqueryservicesimpl.java:296) @ org.apache.phoenix.query.connectionqueryservicesimpl.access$300(connectionqueryservicesimpl.java:179) @ org.apache.phoenix.query.connectionqueryservicesimpl$12.call(connectionqueryservicesimpl.java:1917) @ org.apache.phoenix.query.connectionqueryservicesimpl$12.call(connectionqueryservicesimpl.java:1896) @ org.apache.phoenix.util.phoenixcontextexecutor.call(phoenixcontextexecutor.java:77) @ org.apache.phoenix.query.connectionqueryservicesimpl.ini...

Why do we have two kinds of libraries in C/C++? -

there static libraries , there shared libraries. wouldn't possible have shared ones , link them in statically if needed? compiling once -fpic , once without seems waste. don't know assembly, shouldn't possible transform rellocatable code static code orders of magnitude faster recompiling everything? this partially historical issue. once there static libraries. linked statically every binary system compiled. represented maintenance nightmare among other things, requiring using packages recompiled if library patched or changed. then shared libraries came along fixing these issues. question, firstly there significant optimisations can take place in statically linked library impossible perform on dynamic one, therefore if 1 transform dynamic libraries static ones less efficient code compiled statically in first place. secondly, modern systems use solely shared libraries anyway, there not of issue, things compiled once, shared library. as slight aside, stil...

java - JavaFX chart variable scope -

final categoryaxis yaxis = new categoryaxis(); final numberaxis zaxis = new numberaxis(); if (cbtypegraphview.equals("bar chart")) { barchart<string, number> chart = new barchart<string, number>(yaxis,xaxis); } if (cbtypegraphview.equals("line chart")) { linechart<string, number> chart = new linechart<string, number>(yaxis,xaxis); } anchorpane.settopanchor(chart, 110d); anchorpane.setleftanchor(chart, 10d); anchorpane.setrightanchor(chart, 5d); anchorpane.setbottomanchor(chart, 50d); the chart variable looses scope outside if statement wondering how can fixed chart not lose scope outside if statement. thinking using it's parent class xychart class. i'm not sure how add barchart or linechart xychart . you can do final categoryaxis yaxis = new categoryaxis(); final numberaxis zaxis = new numberaxis(); xychart<string, number> chart = null ; if (cbtypegraphview.equals("bar chart")) { ...

Select in Wordpress Multisite -

why first line (select) works , second line (second select) not work , outcome of second row same first? first line (select blog_id wp_blogs domain = 'subsite.site.com.br') blogid, second line (select blog_id wp_blogs domain = (select option_value wp_9_options option_name = 'siteurl')) blogid, what's wrong syntax, select? please, give me light, i'm 2 days pounding head without solution. that's id of sub-site..

python - Updating the Tkinter button error with code structure Explanation required -

so i'm teaching myself python, , developing simple gui restaurant menu. came across error i'm hoping explain, i've solved doing self.total_button option, rather putting options in parentheses (like did button above it), thing have changed , program runs no errors. the line in total method self.total_button["text"] = "total £"+ str(self.cash_total) works when declare self.total_button way do, if declare each option in parentheses states nonetype' object not support item assignment . does layout matter buttons in tkinter when updating them later in program? #order up! #a simple gui program, presents simple restaurant menu. #it lists items, , prices. #let user select different items , show user total bill. tkinter import * class application(frame): """create gui application.""" def __init__(self, master): """initialises frame""" super(application, self)._...

Incompatible types in web service java -

i have code: @webmethod(operationname = "operation") public boolean operation(@webparam(name = "id") int id, @webparam(name = "nombre") string nombre, @webparam(name = "apellido") string apellido, @webparam(name = "edad") int edad, @webparam(name = "ciclo") int ciclo, @webparam(name = "carrera") string carrera, @webparam(name = "especializacion") string especializacion) { webserviceapp object = new webserviceapp(); boolean estado; estado = object.getwebserviceappsoap().insertar(id, nombre, carrera, edad, ciclo, carrera, nombre); return estado; } but error incompatible types required boolean found void on line: estado = object.getwebserviceappsoap().insertar(id, nombre, carrera, edad, ciclo, carrera, nombre); why getting error?

Does iterating over a hash reference require implicitly copying it in perl? -

lets have large hash , want iterate on contents of contents. standard idiom this: while(($key, $value) = each(%{$hash_ref})){ ///do } however, if understand perl correctly doing 2 things. first %{$hash_ref} is translating ref list context. returning like (key1, value1, key2, value2, key3, value3 etc) which stored in stacks memory. each method run, eating first 2 values in memory (key1 & value1) , returning them while loop process. if understanding of right means have copied entire hash stacks memory iterate on new copy, expensive large hash, due expense of iterating on array twice, due potential cache hits if both hashes can't held in memory @ once. seems pretty inefficient. i'm wondering if happens, or if i'm either misunderstanding actual behavior or compiler optimizes away inefficiency me? follow questions, assuming correct standard behavior. is there syntax avoid copying of hash iterating on values in original hash? if not hash ther...

vb.net - asp.net how to code for Namespace in web-forms VB language -

i have never used namespace(s) when coding webform application using vb language. can pls see proper example based on code snippet 1 of files. not know where place "namespace spacename" sentence. since code refers partial class in filename.aspx.vb file, how namespace reference coded/represented in filename.aspx file art-work design of web-page. option explicit on imports system imports system.data imports system.data.sql imports system.data.sqlclient imports system.diagnostics imports microsoft.visualbasic partial class reports01 inherits system.web.ui.page private enum eformstate integer ... working vb code methods , events follows... end class use this namespace xxx partial class reports01 ... end class end namespace also change aspx file from <%@ page language="vb" autoeventwireup="false" codebehind="reports01.aspx.vb" inherits="reports01" %> to <%@ page language="vb" au...

eclipse - Exception in thread "main" java.util.NoSuchElementException - not sure what's going wrong -

i'm trying write scanner take dataset , parses array. experiencing exception: exception in thread "main" java.util.nosuchelementexception @ java.util.scanner.throwfor(scanner.java:907) @ java.util.scanner.next(scanner.java:1416) @ neural.neuralmain.readfile(neuralmain.java:34) @ neural.neuralmain.<init>(neuralmain.java:97) @ neural.neuralmain.main(neuralmain.java:201) i have seen number of topics on topic here, , seem to checking there being next item available scanner. under impression code did this, appreciated. here relevant section of code: public int[][] readfile( int[][] inputarray, string filename, int datatype) { // "try" block used, constructor throw exception should filename not recognised. try { // code reads scanner, in, attached filename. scanner input = new scanner( new file( filename ) ); //initialising array store input data. inputarray = new int[datatype][65]; ...

node.js - Error after packaging the app with electron-packager -

Image
i'm new electron, , love far, i'm unable package of mine apps, @ first thought it's maybe related code, download " https://github.com/atom/electron-quick-start " run npm install , run "electron-packager . foobar --platform=darwin --arch=x64 --version=0.28.2" build app when try open so didn't touch code example, wanted build , got error, doing wrong? thanks! the versions of electron moving very fast. , times, don't respect "old" ways things (for example, declaring app). i advise not use 0.28.2 version of electron recent one.

How to extract a Either's Right and keep information about its Left in case of error in Haskell? -

i trying extract value in right constructor of either value, while giving error if either in question left (i.e. error). answers in either right left how read value gives me like: fromright e = either (const $ error "either left encountered while expecting right") id e this works discards useful information in error message of left ctor of either . how can post error message left instead? -- edit -- thanks input. wanted more informational version of fromjust . also, i'd avoid writing case statement every time, , want avoid monads whenever it's not complicated (to keep function "eval" style). use case, it's computation-oriented, , errors occur when invalid input supplied (when there no remedy). i ended using: fromright e = either (error.show) id e instead of using const ... in first argument of either , use else. either oops .... oops x = error $ "oops! got " ++ show x or whatever. note, however, err...

OpenCV, use estimateRigidTransform to transform a contour -

ok here's scenario. built paper detection app finds piece of paper in image. doesn't work 100% of time, given white balance , focusing changes, if found sheet of paper in frame 1, want show border around in frame 2 (in reality there can many frame gap), if didn't find in frame 2. in order so, keep old image, , old 4 point contour frame 1. then, in frame n did not find convex contour, want transform old contour using affine transformation compute using estimagerigidtransform. i 100% positive math off, i'm not sure where: // new image = 3200 x 6400 // old image = 3200 x 6400 // old contour = contour found in old image, same scale vector<cv::point> transformcontourwithnewimage(mat & newimage, mat & oldimage, vector<cv::point> oldcontour) { cgfloat ratio = newimage.size().height / 500.0; cv::size outputsize = cv::size(newimage.size().width / ratio, 500); mat image_copy; resize(newimage, image_copy, outputsize); //shrink images d...

asp.net - can't get my web site, on IIS, to work with URL beginning with www -

i added vb.net web app iis 8 on azure windows 2012 server r2 vm. then, did iis > right-click sites > add web site , set "site name" my_site.org , set physical path project directory web site , set "host name" my_site.org. works great. internet, browse http://my_site.org , runs ok. now want people browse www.my_site.org when add web site, above, www.my_site.org adds ok, when select www.my_site.org , click iis browse www.my_site.org browser pops reads "webpage cannot found" nor can browse internet. because www? subdomain need www exist load www. best option may set domain forwarding www, maybe cname in domain options?

html - Get effective color of background image after filter via javascript -

i have full-page background image changes often. has css3 gaussian blur filter on top of it. how can obtain effective color (the color rendered) @ given pixel? i need compute average color of background affects other css parameters. how answer? sounds images have same domain assuming you're doing way. https://stackoverflow.com/a/17789253/5750070

c++ - SFML - sf::RenderWindow, dividing files -

so trival need know why happen way , how can change it. so started learn sfml today , reading sfml game development ebook , saw interesting , written code. went through tutorials sfml , started learn language understood general idea of way how should work. so wanted remember new keywords, constructors, methods make code organized - using have learned keep clean , easy edit, debug. my first code display window , created same code in both ways, putting main function , separated. thing first window displayed long won't close , second 1 displaying less second , program turning off. it because destructor called right after turn on , adding more functions keep object busy way go well, want understand it. it's last thing don't understand learned objective programming. way objects working. right after create them, using them task, when done being deleted, need them again. wish understand how work , find easy , quick fix/idea make work long want to. code : first prog...

Should tomcat be changed to SSL mode if a web app in it must support connections to LDAPS? -

i have web application deployed in tomcat. web application must talk active directory on ssl (ldaps url). should tomcat server.xml changed include ssl connection? or tomcat's setting not matter web app sits in it? the 2 things unrelated. 1 concerns outbound connections via ldaps, other concerns inbound connections via https. however tomcat application should support https anyway.

Batch script How to add space on a numerical variable -

first of approaches, excuse me if not express myself in english. i'm debutante in batch , need make script i articles.txt retrieves document in there many lines. lines of document "t0047" ;"tuyau 1km";"marque2";"jardinage";"75 000";"promo" "t00747";"tuyau 1m";marque2";"jardinage";"30 000";"promo" first, have remove quotation marks in file. done with: @echo off setlocal enabledelayedexpansion /f "delims=" %%a in (articles.txt) ( set a=%%a set a=!a:"=! echo !a! echo !a! >>resultat.txt ) the result t0047 ;tuyau 1km;marque2;jardinage;75 000;promo t00747;tuyau 1m;marque2;jardinage;30 000;promo then have perform multiplication on column. this, have problem if space not mutiplication realize made script removes spaces. @echo off setlocal enabledelayedexpansion /f "delims=; tokens=1-8" %%a in ...

asp.net - Filter GridDropDownColumn by ListTextField -

i implemented first solution in: filtering listtextfield griddropdowncolumn my code is: aspx <telerik:griddropdowncolumn datasourceid="sqldatasource2" listtextfield="nm_comunidade" listvaluefield="id_comunidade" uniquename="nm_comunidade_coluna" sortexpression="nm_comunidade" headertext="comunidade" datafield="id_comunidade"dropdowncontroltype="radcombobox" footertext="" allowautomaticloadondemand="false" autopostbackonfilter="true" currentfilterfunction="startswith" allowvirtualscrolling="true" showmoreresultsbox="true" itemsperrequest="10" filtercontrolwidth="100%" showfiltericon="false" columneditorid="nm_comunidade_editor"> </telerik:griddropdowncolumn> <telerik:gridboundcolumn datafield="nm_comunidade" headertext="nm_comunidade" sortexpression="nm_com...

json - Jquery-No 'Access-Control-Allow-Origin' header is present on the requested resource -

i have request json data other website, meets problem of access control allow origin in header, have no idea how set access control allow origin in header, i'm put source code in iis8 access json data iis8 api source. $.ajax({ type: "get", url:rooturl, xhrfields: { withcredentials: false }, headers: { "access-control-allow-origin: ": "*", "access-control-allow-methods: ": "get", "access-control-allow-headers: ": "authorization", }, datatype: "json", success: function(data) { }, error: function() { alert("an error occurred while processing json file."); } }); these should in server, not client: "access-control-allow-origin: ": "*", to implement in server, php: <?php header("access-control-allow-origin: *"); for asp.net: response.appendheader("ac...

asp.net mvc 3 - How can I change this block of code to return only records associated with a specific ID.? -

i’m trying create query returns records associated 1 person’s id. i’ve tried this: viewmodel.students = db.students.where(sd => sd.studentid==9); but don’t know how cast instructorindexdata() or whether should way. how can change block of code return student id==9 ? var viewmodel2 = new instructorindexdata(); viewmodel.courses = viewmodel.instructors.where( => i.instructorid == 2).single().courses viewmodel.enrollments = viewmodel.courses.where( x => x.courseid == 600).single().enrollments; viewmodel2.students = db.students.where(sd => sd.studentid==9); return view(viewmodel); instructor index data: public class instructorindexdata { public ienumerable<instructor> instructors { get; set; } public ienumerable<course> courses { get; set; } public ienumerable<enrollment> enrollments { get; set; } public ienumerable<student> students { get; set; } public ienumerable<assignment...

html - JavaScript finding, displaying nodes -

Image
there software adds "powered by..." text , image link. in it's license says it's not forbidden remove addition. hand, when refresh page, powered thing added again, need hide it. there couple ways, want javascript help. here have in every page bottom: this code can see: </td></tr></table> </td></tr></table> <br/><br/><center><small> <a href="http://pages.ebay.com/blackthorne/" target="_blank"><img align=absbottom border=0 src="http://www.blackthornesw.com/bthome/blackthorneb2shade_gb.bmp"</img></a></small></center><br/><center><font face=arial,helvetica size=2>powered <a href="http://pages.ebay.com/blackthorne/" target="_blank">ebay blackthorne 04.11.017</a></font></center> <script> function erroroff() {return true;} window.onerror = erroroff; settimeout("document.im...

Can EF Code First work with LocalDB in a ClickOnce application? -

so, i'm trying out ef code first, can have code drive updates database. i'm working on clickonce app using localdb, figured may best solution me, since otherwise changes mdf file cause overwritten on client when deployed, losing entered before. however, i'm having fair share of new problems around code first migrations. i've followed through code first migrations on msdn , , i've managed initial configuration created, initial database creation. the problems begin when try make first actual migration. added 1 single field 1 of models, , tried make explicit migration handle schema change next time publish. well... pm> add-migration addispercentfield unable generate explicit migration because following explicit migrations pending: [201601052011180_initialcreate]. apply pending explicit migrations before attempting generate new explicit migration. ok... i'll run update , try again: pm> update-database specify '-verbose...

javascript - json objects = respecive html divs -

what exact way(javascript/jquery) point objects created in external json file point , populate corresponding html divs. posting complete code html , json. refer image clear idea of divs , data hold.also should happen @ html onload event. html code first2 accounts <div class="mymainsavings"> <div class="mymainsavingstop"> <table class="mymainsavingstop"> <tr> <td></td> </tr> <tr> <td></td> </tr> <td></td> </table> <div class="interestrate"> </div> <div class="regu...

swift - Navigation and Tab bar disappear with Push Segue -

i'm developing swift app has tab bar controller , 1 of tabs has navigation controller. tab navigation controller has table view, , cells in table view segue regular view controller. information appears in destination view controller desired, put when destination view controller presented, both tab bar , navigation bar disappear. here prepareforsegue: override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) { if segue.identifier == "entrycelltoentryview" { if let destination = segue.destinationviewcontroller as? entrydetailviewcontroller { if let index = customtableview.indexpathforselectedrow { if let cell = customtableview.cellforrowatindexpath(index) as? entrytableviewcell { destination.entrytodisplay = cell.entry } else { print("prepareforseque: unable cast cell entrytableviewcell") } ...

javascript - Jquery auto numbering based on class div, but reset counter on specified div -

Image
i have problem jquery numbering, want reset counter of green tables data, first tables data 1),2),3) next tables data 4),5),6) want reset 1),2),3),4) , on green tables data the code used in javascript is var num1=1,num2=1,num3=1,num4=1; $(".lv0name").each( function() {$(this).text(romanize(num1) +". "+ $(this).text());num1++;}); $(".lv1name").each( function() {$(this).text(num2 +". "+ $(this).text());num2++;}); $(".lv2name").each( function() {$(this).text(num3 +"). "+ $(this).text());num3++;}); $(".lv3name").each( function() {$(this).text(num4 +". "+ $(this).text());num4++;}); part of code <table border="1" id="tabletabular" class="tablenum"> <tr> <td bgcolor="blue" class="lv0name" id="root40" style="padding-left: 20px;">luas wilayah</td> ...