Posts

Showing posts from February, 2011

c# - Code to be working in code a and b -

this regex code v>fant <strong>(.+?) treff</strong> på ditt søk< works code a <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td><div id=\"boxhit\"><div> <div>fant <strong>12 treff</strong> på ditt søk</div></div></div></td></tr></table></div> but not code b <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td><div id=\"boxhit\"><div> <div>fant <strong>1 162 treff</strong>, viser de 100 første</div></div></div></td></tr></table></div> i don't know part need add in order change in order regex code working code , b. use http://regexstorm.net/tester in order test code. you use v>fant <strong>(.+?) tre...

Error when reassigning the ESC key in isearch-mode of Emacs -

i follow instruction of god-mode in emacs reassign esc key isearch-mode-map , god-mode-isearch-map encounter following error error: key sequence <escape> <tab> starts non-prefix key <escape> the relevant code in emacs init file is: (require 'god-mode-isearch) (define-key isearch-mode-map (kbd "<escape>") 'god-mode-isearch-activate) (define-key god-mode-isearch-map (kbd "<escape>") 'god-mode-isearch-disable) the problem comes second line (define-key isearch-mode-map (kbd "<escape>") 'god-mode-isearch-activate) . if line commented out, no error reported, cannot reassign <escape> key of isearch-mode i did try google un-set <escape> key haven't been able resolve it. is there know how fix it? thanks taking time @ question!

Pivot multiple input parameter in SQL server?How to reduce query running time -

below query have writing daily inventory-sale each shop in have 2millon row data month have more 250 shop!! take longer expected !! alter procedure [dbo].[getdaily] --declare @date1 date = '2015-06-01' ,@date2 date = '2015-06-30' ,@storeno nvarchar(max)=' , s.storeno in (61,63,450,451)' begin if object_id(n'tempdb..#calender') not null drop table #calender if object_id(n'tempdb..##temp') not null drop table ##temp if object_id(n'tempdb..##inv1') not null drop table ##inv1 if object_id(n'tempdb..##inv2') not null drop table ##inv2 if object_id(n'tempdb..#stock') not null drop table #stock if object_id(n'tempdb..##storelist') not null drop table ##storelist if object_id(n'tempdb..##final') not null drop table ##final if o...

Netbeans curly braces formatting -

when declaring new method in netbeans, follows: $cursor used mark position of cursor public void inc(){$cursor} then hit enter, output follows: public void inc(){ $cursor} what want follows: public void inc(){ $cursor } how can achieve result in netbeans? i this: public void inc(){$cursor then hit enter. in short: don't type out second curly brace, it's generated line break.

c - Convert an int** array into a char** array of a different size / composition -

i'm trying convert int** array looks below, char** array made number of rows , comma seperated. 1 2 3 4 5 6 7 8 9 3 2 1 an example of char** array represented [['1','1','2','3','4'], ['2','5','6','7','8'] , ['3','9','3','2','1']] every 0'th index represented row number. i'm not sure how able achieve this, there known methods converting int** this? thanks. i think needed string, not 2d-array. can written out string write standard output implementing string simple extension. #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct char_vec { char *v; size_t capacity; size_t used; } sstream; sstream *ss_new(void); void ss_free(sstream *ss); void ss_putc(sstream *ss, char ch); void ss_puts(sstream *ss, char *str); int main(void){ int rows = 3; int cols = 4; int **array = malloc(r...

Regex is matching quotes when I do not want it to -

here link demo http://www.regexplanet.com/cookbook/ahjzfnjlz2v4cgxhbmv0lwhyzhnydwssbljly2lwzrjrstamda/index.html select java 1 , @ input. can supply arguments either within quotation marks or without. however, when regex captures groups, don't want capture quotes arguments enclosed within quotes. it's confusing because quotes out of brackets don't know why they're being captured. how can fix this? edit: to clarify, want output this: hello-world hi \" \\ sparta if don't want double quotes caught need avoid matching them using zero-width assertions - lookarounds: (?<=")(?!\s+")(?:[^\\"]+|\\")+(?=")|[^"\s]+ live demo

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -

i'm trying read json file local machine. @path("/") public class jsonparsing { file f = new file("file.json"); if (f.exists()){ inputstream = new fileinputstream("file.json"); string jsontxt = ioutils.tostring(is); system.out.println(jsontxt); jsonobject json = new jsonobject(jsontxt); string = json.getstring("1000"); system.out.println(a); } } but i'm getting error in tostring() method. possible read .txt file containing json object local machine? if possible, how done? firstly: whenever ask question- add imports well. secondly: yes possible read .txt file containing json object. steps: 1. add maven dependency in pom.xml - <dependency> <groupid>com.googlecode.json-simple</groupid> <artifactid>json-simple</artifactid> <version>1.1.1</version> </dependency> or add jar of dependency. 2.import...

Dispatcher Servlet Mapping - Spring Framework -

i new spring framework , wondering why every time create new spring project , set dispatcher mapping / instead of default *.htm . <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> thanks! 1. <url-pattern>*.html</url-pattern> : we specifying servlet class dispatcherservlet acts front controller in spring web mvc. incoming request .html file forwarded dispatcherservlet. 2. <url-pattern>/</url-pattern> : a mapping contains pattern <url-pattern>/</url-pattern> matches request if no other pattern matches. default mapping. servlet mapped pattern called default servlet.the default mapping directed first page of application. thanks..

r - conditionalPanel in shiny based on number of items in inputSelect -

Image
i trying implement conditionalpanel based on number of items in selectinput dropdown box. i can condition work when based on value of dropdown per following (the textinput field allows set number of items in dropdown): runapp( list(ui = fluidpage( textinput("in_number", "number",1), uioutput("dropdown"), conditionalpanel("input.dropdown >= 3", p("show stuff")) ), server = function(input, output, session) { output$dropdown <- renderui({ selectinput("dropdown","my dropdown", c(1:input$in_number)) }) } ) ) however if change conditionalpanel be: conditionalpanel("input.dropdown.length >= 3", p("show stuff")) then doesn't work. error message in developer tools console saying "cannot read property 'length' of undefined" i assume how shiny defines dropdown items. edit: clarify needs. there way javascript condition...

Django Foreign Key and Forms -

i new django , wondering if help. trying display form in template toolcheckout have 2 foreign keys referencing 2 models. keep receiving error , have had no luck finding solution. error: "coercing unicode: need string or buffer, long found" giving error on template line: "{{form.as_p}}" i using mysql db had built project. form: class toolcheckoutcreateform(forms.modelform): class meta: model = tooltransaction fields = [ "toolid", "quantity", "partyid", "checkoutdate", "checkindate", ] models: class tool(models.model): toolid=models.charfield(max_length=100, primary_key = true, unique=true, null=false) quantity=models.integerfield(null=false) location=models.charfield(max_length=100, null=false) categoryid=models.integerfield(null=true) deleted=models.booleanfield(default=0) objects=models.mana...

angular - Form is not getting displayed when the values are empty -

my template not displaying when details empty getting displayed when details has values.i have been structed here , not able find solution.can please me.......... html, <div class = "nopadding col-sm-12"> <form class="nobottommargin" [formgroup]="form" (ngsubmit)="onsubmit(form.value)" name="template-contactform"> <div class="col-sm-12 nopadding socialaddress"> <div class="col-sm-12 formpaddingcss"> <h3 class = "headingfontcss">social address</h3> </div> <div class="col-sm-12 formpaddingcss cardbackgroundcolor"> <div class="col-sm-7 cardtopbottompadding noleftpadding"> <div class="col-sm-12 nopadding"> <label for="template-contactform-name" class="col-sm-5 nopadding">facebook <small>*</small></la...

javascript - e.target returning undefined? -

this question has answer here: how return response asynchronous call? 24 answers the following function returns undefined instead of id of element clicked on. why doing this? // id of target element clicked on getid: function() { var cell = document.getelementbyid('board'); cell.addeventlistener('click', function(e) { return e.target.id; }); }, your getid() function add listener, , don't return id... consider snippet, it's working: var cell = document.getelementbyid('board'); var id = cell.addeventlistener('click', function(e) { console.log (e.target.id); }); <body> <div id="board"> <div id="messagearea">let's begin! enter position below. </div> <table> <tr> <td id="00">00</td>...

select function may upate timeout parameter in linux.why it is 'may update'? -

my operating system centos 6.4. for select linux programmer's manual says: "select may update timeout parameter indicate how time left...." i wonder why 'may' rather 'must'? there system version or kernel version? i make test. test_code01.cpp #include <stdio.h> #include <string.h> #include <errno.h> #include <sys/socket.h> #include <resolv.h> #include <stdlib.h> #include <netinet/in.h> #include <arpa/inet.h> #include <unistd.h> #include <fcntl.h> #include <sys/time.h> #include <pthread.h> #define bufsize 1024 struct timeval g_timeout; int main(int argc, char* argv[]) { int sock_clientfd, ret_recvsize, i; struct sockaddr_in dest, mine; char buffer[bufsize + 1]; // create socket fd if ((sock_clientfd = socket(af_inet, sock_stream, 0)) < 0) { perror("socket"); exit(exit_failure); } // init server address client ...

c++ - Why doesn't Qt send debug message to std error stream in Windows? -

this question has answer here: qdebug , cout don't work 2 answers i use qdebug() in eclipse in windows, doesn't give me output, seems qt sends debugger qt's documents below. the qt implementation of these functions prints text stderr output under unix/x11 , mac os x. windows, if console application, text sent console; otherwise, sent debugger. my purpose not how print message in eclipse in windows. my purpose know why qt doesn't choose send debug message std error stream in windows, while sends debug message std error stream in mac os. is there differences between windows , mac os? thanks help. since question "why" , not "how", reason twofold: gui programs under windows don't have console, have open (and release versions of course won't, that'd annoy users). don't inherit console of process sta...

Python - 3D mapping, without 3D engines -

does know how this? want able map texture 3d cube in python. here's code far, from pygame import gfxdraw import pygame, sys, math def rotate2d(pos,rad): x,y=pos; s,c = math.sin(rad),math.cos(rad); return x*c-y*s,y*c+x*s class cam: def __init__(self,pos=(0,0,0),rot=(0,0)): self.pos=list(pos) self.rot=list(rot) def events(self,event): if event.type == pygame.mousemotion: x,y = event.rel x/=200;y/=200 self.rot[0]+=y; self.rot[1]+=x def update(self,dt,key): s=dt*10 if key[pygame.k_q]: self.pos[1]+=s if key[pygame.k_e]: self.pos[1]-=s x,y = s*math.sin(self.rot[1]),s*math.cos(self.rot[1]) if key[pygame.k_w]: self.pos[0]+=x;self.pos[2]+=y if key[pygame.k_s]: self.pos[0]-=x;self.pos[2]-=y if key[pygame.k_a]: self.pos[0]-=y;self.pos[2]+=x if key[pygame.k_d]: self.pos[0]+=y;self.pos[2]-=x class cube: vertices = (-1,-1,-1),(1,-1,-1),(1,1,-1)...

python - Concatenating two strings in a list of lists -

the title bit misleading i'm not quite clever enough come appropriate header describes i'm trying accomplish, apologize that. can compensate description below. i'm working on exercise book requires bit of cleanup before can perform other operations. have list of lists in elements in some , not all, of these lists require update through concatenation (or perhaps other, more efficient, means if people suggest them). better explain, here slice list of lists: [['e726fb69de83a3ec', 'general_mobile', 'android', 'unknown', '0'], ['1b8978f618d59eef', 'general_mobile', 'ios', 'unknown', '0'], ['8ee82ed6c2c5af59', 'general_desktop', 'windows', 'xp', 'male', '29'], ['d0fff09ca1829e65', 'general_mobile', 'android', 'female', '48'], ['3126deccaae39ea1', 'general_desktop', 'windows', ...

javascript - Unit testing Typescript decorators -

i have application built on typescript decorators convenience property assignments , wondering how can go writing unit tests them. export function apiurl() { return function (target: any, key: string) { let _value = target[key]; function getter() { return _value; } function setter(newvalue) { _value = getapiurl(); } if (delete target[key]) { object.defineproperty(target, key, { get: getter, set: setter }); } }; } in spec class have, it("should return url string", ()=> { @apiurl(); let baseurl:string; expect(baseurl typeof string).tobe(true) }) since decorators functions suggest test them other function. , if need to, add 1 tests shows how use decorator class/member/... here example such test like: import test 'ava'; import { apiurl } './path'; cons...

NSSortDescriptor with Selector for CloudKit in Swift -

i trying sort results of cloudkit query (a ckrecord string full of text) using nssortdescriptor. sort relevance (i.e. how keywords appear in said text). trying selector pointing function decide text relevant. when try this, xcode keeps making me add @obj front of selector , function. selector not correctly taking perimeters. is possible in pure swift, or need use objective-c? if so, should perimeters like? note: not opposed using objective-c if have to, have never done before.

Python program fails on Windows but not on Linux -

Image
the program below triggers unicodeencodeerror on windows 10 machine (running python 3.5.2) no error @ on linux machine (running python 3.3.2). #!/usr/bin/python import logging str ="antonín dvořák" logging.basicconfig(filename='log.txt', level=logging.info) logging.info(str) on linux, log file correctly contains: info:root:antonín dvořák on windows, following error: any ideas on possible cause discrepancy? instead of file name, pass stream encoding specified: logging.basicconfig( stream=open('log.txt', 'w', encoding='utf-8'), level=logging.info ) as cause, it's trying open target file using current locale's encoding (cp1252, judging stack trace).

html - Truncate Multi Line Text Using CSS Based off of Div Height -

currently, have div set height. <div class="card yellow-task task" style="height: 255px;"> <div class="div-content"> lorem ipsum dolor sit amet, consectetur adipiscing elit..... </div> </div> assuming text (when wrapped throughout height of div) longer div can contain how truncate text using css? the code using uses -webkit-line-clamp , ellipsis truncate text based off of lines. display: block; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; unfortunately, have no way of knowing how many lines in each div. problem divs being generated dynamically based off of other properties angular js , ng-repeat . this question has been asked: with css, use "..." overflowed block of multi-lines - edit: question answers jquery solutions. since op works angular , not jquery, think might valid end edit -- ellipsing on multiple lin...

Method prefixes in Go -

in go, there's "prefix" can put on function. how useful? use cases this? example: type struct { thing string } func (something a) b() { fmt.println(something.thing) } programming communication: communicating machine should do, , communicating other programmers (including future self). many higher-level programming constructs serve purpose of making code more expressive--that is, more stating programmer's intent. go's function receivers "self" object in more traditional object-oriented languages. it's way of grouping set of functions , saying "these methods exist operate on objects of type", rather being general utility methods happen take argument of type. in other words, exist describe behavior of abstract object state described structure.

/usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory -

i error: (cv) jalal@klein:~/computer_vision/py-faster-rcnn/caffe-fast-rcnn$ make -j8 && make pycaffe protoc src/caffe/proto/caffe.proto cxx src/caffe/blob.cpp cxx src/caffe/data_reader.cpp cxx src/caffe/layer.cpp cxx src/caffe/solvers/adadelta_solver.cpp cxx src/caffe/solvers/rmsprop_solver.cpp cxx src/caffe/solvers/adagrad_solver.cpp cxx src/caffe/solvers/nesterov_solver.cpp cxx src/caffe/solvers/sgd_solver.cpp cxx src/caffe/solvers/adam_solver.cpp cxx src/caffe/syncedmem.cpp cxx src/caffe/common.cpp cxx src/caffe/internal_thread.cpp cxx src/caffe/layer_factory.cpp in file included /usr/include/boost/python/detail/prefix.hpp:13:0, /usr/include/boost/python/args.hpp:8, /usr/include/boost/python.hpp:11, src/caffe/layer_factory.cpp:4: /usr/include/boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: no such file or directory compilation terminated. makefile:565: recipe target '.build_release/src/caffe/lay...

CSS For Fullpage on Wordpress -

i new , limited on knowledge of css. working on building website using salient theme on wordpress. homepage, trying build landing page or sort of "portal." ideally, responsive , fit browser regardless of width or height. i using custom css page in wordpress , have following: .at-content { position: fixed; background-color: #f7f6f5; height: 100%; width: 100%; overflow: scroll;} i think part of problem have fixed, if change position giant grey bar appears @ bottom of browser when becomes large. currently responds when change width, height remains same. here current page: http://chairflyer.com any on how fix appreciated. you can use vh , vw fit dimensions of viewport (viewport height , viewport width). .at-content { width: 100vw; height: 100vh; }

excel - Unable to open .xlsx file exported from Access 2010 using DoCmd.TransferSpreadsheet -

i'm having problems vba code exports table ms access 2010 excel 2010 format using docmd.transferspreadsheet command. code runs without error in access , file created. however, when try open file in excel 2010 receive following error message: excel cannot open file 'xxxxx.xlsx' because file format or file extension not valid. verify file has not been corrupted , file extension matches format of file. here code use setup , execute export: exportfilename = "\\network1\share$\filename_" & ".xlsx" docmd.transferspreadsheet acexport, acspreadsheettypeexcel12, "tablename", exportfilename, true i looked @ number of possible solutions before posting, have tried replacing acspreadsheettypeexcel12 acspreadsheettypeexcel12xml replacing acspreadsheettypeexcel12 integer 10 or 9 ensuring had full access/permissions directory saving file opening file file -> open dialog rather double-clicking file saving file local loca...

c++ - Redirecting cout to the new buffer that created with winapi -

i'm trying print new screen buffer i've create winapi it's going old buffer , doesn't show on screen, possible, redirecting cout new screen buffer created using winapi? #include <iostream> #include <windows.h> int main() { handle stdbuf, nbuf; dword numberofchars; stdbuf = getstdhandle(std_output_handle); nbuf = createconsolescreenbuffer(generic_write, 0, null, console_textmode_buffer, null); setconsoleactivescreenbuffer(nbuf); setstdhandle(std_output_handle, nbuf); // showing on screen writeconsole(nbuf, "second buffer", 13, &numberofchars, null); // going first buffer std::cout << "second buffer cout" << std::endl; sleep(3000); setconsoleactivescreenbuffer(stdbuf); closehandle(nbuf); int = 0; std::cin >> a; return 0; } yes, it's possible. no, it's not entirely trivial. the basic problem simple: there existing stream bu...

c# - XAML bound property isn't working as expected -

Image
i have crew property, property has several fields, few of code , invoiceamount. plus button supposed insert new crew observablecollection of crews. adding first item works fine, when second item inserted first item's code changes second item , second item has no visible code. how fix new crew inserted every time click + button? starting ui: after 1 item (a) has been added: second item (b) has been added: here's viewmodel code: public class mainpageviewmodel : viewmodelbase { public mainpageviewmodel() { addcrewcommand = new customcommand(param => addcrew(), null); crews.collectionchanged += new notifycollectionchangedeventhandler(crews_updated); } private void crews_updated(object sender, notifycollectionchangedeventargs e) { raisepropertychanged("lvcrewlist"); } public crew crew { get; set; } = new crew(); public observablecollection<crew> crews { get; private set; } = new observa...

php - SQL display and fetch GROUP BY categories -

i have list of authors , display book genre, this: horror stephen king author 2 author 3 ... comedy author 4 author 5 ... in database have author table: t_author aut_name | aut_genre stephen king | 1 ... ... author 4 | 2 and genre table : t_genre genre_id | genre_name 1 | horror 2 | comedy ... ... i've tried use group can't find how display names of category , organize list: select t_author.aut_name, t_author.aut_genre t_author left join t_genre on t_author.aut_genre = t_genre.genre_id group t_genre.aut_genre so, using mysql , pdo, is there way select , fetch authors , display categories? no need i'm not looking code clue because don't see how describe it. mean, group right statement use? edit 1 : apparently, looking : select t_author.aut_name, t_author.aut_slug, t_genre.genre_name t_author left join t_genre on t_author.genre_id = t_genre.genre_id but displays: h...

jquery - Click specific div element that is closest to my span tag -

i wrote function returns 4 different span elements multiple choice. wrote function selects answer. i'm not sure how can hook these 2 pieces together. here spans returned <span class="choice-label" data-bind=​"text:​ fact.value">​randy thompson</span>​ <span class=​"choice-label" data-bind=​"text:​ fact.value">​colton roberts​</span>​ <span class=​"choice-label" data-bind=​"text:​ fact.value">​eric stavers​</span>​ <span class=​"choice-label" data-bind=​"text:​ fact.value">​jessica linglong​</span>​ my other functions returns first name only, example ' eric ' each span above surrounded div btn btn-class . how pick out span matches 'eric'. here function grabs name later used var s = $("div.card-content[data-bind='resizedimage: questionfact.value']").css('background-image'); var n = s.indexof(...

r - dplyr::mutate:- new column = difference between two comma-delimited list columns -

example works: df <- data.frame(c0=c(1, 2), c1=c("a,b,c", "d,e,f"), c2=c("b,c", "d,e")) df # c0 c1 c2 # 1 1 a,b,c b,c # 2 2 d,e,f d,e # add column d difference between c1 , c2 df %>% mutate(d=setdiff(unlist(strsplit(as.character(c1), ",")), unlist(strsplit(as.character(c2), ",")))) # c0 c1 c2 d # 1 1 a,b,c b,c # 2 2 d,e,f d,e f i expected above: d assigned difference between these 2 lists of characters (they sorted). however, if introduce more 1 different character no longer works: df <- data.frame(c0=c(1, 2), c1=c("a,b,c", "d,e,f,g"), c2=c("b,c", "d,e")) df # c0 c1 c2 # 1 1 a,b,c b,c # 2 2 d,e,f,g d,e # add column d difference between c1 , c2 df %>% mutate(d=setdiff(unlist(strsplit(as.character(c1), ",")), unlist(strsplit(as.character(c2), ",")))) error: wrong result size (3), expected 2 or 1 what wanted there...

javascript - dynamically create a div and combobox, and put combobox in the div using Dojo -

i want create div , combobox dynamically, put combobox in div. please see codes below. when run code, threw failed execute 'appendchild' on 'node': parameter 1 not of type 'node'.(…) "typeerror: failed execute 'appendchild' on 'node': parameter 1 not of type 'node' . what correct way place combobox in div? var combobox = new combobox({ name: "state" }); combobox.set('style', {width: '100%', height: '35px', fontsize: '30px'}); var comboboxdiv = domconstruct.create("div"); comboboxdiv.id = "state"; domconstruct.place(combobox, comboboxdiv); you error because domconstruct handle dom nodes, , trying use object, but, can still use it, need pass combobox domnode domconstruct.place(combobox.domnode, comboboxdiv); domnode attach point widgets have, reference root template of widget. also, note in code...

c++ - What's making this algorithm crash? -

before showing code, let me explain problem in detail. need create 2 dat files data hotels in them. 1 of files contains following info: name of province hotel in (string of 16), category of hotel (int), code of hotel (int), name of hotel (string of 30), amount of rooms (int), , amount of reserved rooms (int). second dat file contains code of hotels being eliminated list. final part of test create file has of information of remaining hotels. since, in theory, have info if 2 first dat files, wrote simple. noteworthy mention have use dev c++ 4.9.9.2: #include <iostream> #include <cmath> #include <fstream> #include <string.h> #include <cstdio> using namespace std; struct rhot { char provincia[16]; int categoria; int chot; char nombrehotel[30]; int canthabitaciones; int habitreservadas; }; int main() { rhot hot1 = { "còrdoba", 4, 1, "la pachamama", 100, 49 }; rhot hot2 = { "salta",...

python Combining items in a list of lists based on contents -

i have list of lists have different amount of lists each time depending on other conditions. each of list contains 4 items. want if elements 1,2,3 of 2 of inner lists same, add element 0 , delete duplicates. list looks this: [ [4, 'blue', 'round', none], [6, 'blue', 'round', none], [8, 'red', 'round', none], [10, 'red', 'round', none], [8, 'red', 'square', none], ] i think making new list might not sure. need end product be: [ [10, 'blue', 'round', none], [18, 'red', 'round', none], [8, 'red', 'square', none], ] the amount of different lists inside list different. appreciated. roughly speaking, doing associating element 0 tuple defined last 3 elements of given list. luckily, it's okay tuple key of dictionary! from collections import ordereddict color_data = [[4,'blue','round','non...

c# - Entity Framework's Entity Data Wizard Crashes When Connecting to MySQL Database -

i attempting create entity data model using wizard reverse engineer existing mysql database. choose data connection page of wizard, select existing mysql connection , click next, , wizard crashes. specifically, dialog box disappears without error message or trace. every single time. restarting vs or windows nothing. i can connect database using server explorer , same connection without problem, i'm confident isn't connection problem. this in visual studio 2015 updates installed, version 1.2.6 of mysql visual studio, ef 6.1.3, , mysql.data , mysql.data.entity.ef6 versions 6.8.3.0. console application targeting .net framework 4.6.1. google hasn't revealed useful yet. question here yesterday similar, crashing @ different point , user can't connect using server explorer. seems different situation. there nothing in windows logs of help. how can solve problem? it caused version mismatch. on system, had mysql connector 6.9.6. issuing command in nuget ...

plot - Stata Overlapping Histograms Different Color Where Overlap -

is possible have different color in portions of overlap when have 2 histograms on same plot? have in mind can done in sas: http://blogs.sas.com/iml/uploads/dualhist.png in other words, 1 of histograms semi-transparent. although there arguably many better ways compare distributions, shows small tricks: sysuse auto, clear twoway histogram mpg if foreign, width(2) start(12) blcolor(red) bfcolor(none) fraction || histogram mpg if !foreign, width(2) start(10) barw(1.8) bfcolor(none) blcolor(blue) fraction ytitle(proportions) legend(order(1 "foreign" 2 "domestic") col(1) pos(1) ring(0)) .

c# - DocuSign SOAP Expirations not being set -

i using soap api in docusign using c#. on envelope, trying set expiration date end of 2016. per docusign support, max allowed 999. when @ envelope in correct mode on web site, not see date being set. our company has set 90 days , that's expiration date see. docusignapi.envelope envelope = new docusignapi.envelope(); envelope.enablewetsign = false; envelope.allowreassign = false; docusignapi.expirations exp = new docusignapi.expirations(); exp.expireenabled = true; exp.expireafter = "128"; exp.expirewarn = "0"; docusignapi.notification ntf = new docusignapi.notification(); envelope.notification = ntf; docusignapi.reminders rem = new docusignapi.reminders(); docusignapi.expirations exp = new docusignapi.expirations(); envelope.notification.expirations = exp; exp.expireenabled = true; exp.expireafter = totd...

ios - Core Data Swift cast failure in generic function in optimized builds -

we have app broad core data model, lots of custom subclasses implemented in objective c, used growing fraction of app that's written in swift. (for it's worth: we're building xcode 7.3.1 against ios 9.3, , swift code 2.2.) there's helper function written in swift looks this: extension nsmanagedobject { func incontext<t: nsmanagedobject>(moc: nsmanagedobjectcontext) -> t? { guard self.managedobjectcontext != moc else { return (self as! t) } { let obj = try moc.existingobjectwithid(self.objectid) return (obj as! t) // <--- fails here } catch let error { return nil } } } this called in fair number of places objects jump contexts. calling code looks this: let result: ecfoo? = foo.incontext(managedobjectcontext) this works flawlessly in debug builds of app. optimizations turned on, i'm running case call fails @ line i've marked, fetched object being cast nsmanagedobject correct subclass....

dojo - dgrid custom sort with secondary sort column -

i'm using custom sort function on dgrid (pasted below). doesn't change sorting drastically, sorts 1 particular column uniquely , sorts others case-insensitive. i'd add secondary sort column named "scheduled" added sort when other column sorted. i'm not sure how go it. i've seen how override sort sort 2 columns, not when custom sort in play. secondary sort there, not matter other column clicked. for reference i'm running dojo 1.10 , dgrid 1.0. data coming requestmemory dstore , i'd rather sort happen on grid rather @ store level. appreciated. currgrid.on('dgrid-sort', function (event) { event.preventdefault(); var sort = event.sort[0]; currgrid.set('sort', function (a, b) { if (sort.property == "thisfield") { //special sort thisfield if (a[sort.property] !== 'undefined' && typeof a[sort.property] == "string") { var colora = a[sort.property...

angular - Increment and decrements item quantity based on id (S.NO) -

Image
i have app in allows user increment or decrement in-stock quantity of item. when click increment or decrement button, all items changed @ once. item clicked row should changed. doing wrong? html code <ion-content class="item"> <ion-list *ngif="showlist"> <ion-item *ngfor="let item of items"> {{ item }} </ion-item> </ion-list> <ion-list> <div class="header"> <ion-item> <ion-row > <ion-col width-15>sno</ion-col> <ion-col width-25>partno</ion-col> <ion-col width-25>qty</ion-col> <ion-col width-15>price</ion-col> <ion-col width-20>action</ion-col> </ion-row> </ion-item> </div> <div class="list"> <ion-item *ngfor="let list of quickorder; let = index"...