Posts

Showing posts from August, 2012

php - Can't get Laravel 4.2 to hash my passwords -

i've hashed passwords many times can't seem work on client's site. here controller: class listingcontroller extends basecontroller { public function create() { return view::make('listing.listing'); } public function store() { $validator = validator::make($data = input::all(), listing::$rules, listing::$messages); if ($validator->fails()) { return redirect::back()->witherrors($validator)->withinput(); } $data['passsword'] = hash::make(input::get('password')); listing::create($data); return redirect::to('/success')->with('message', 'thank you, listing has been submitted.'); } } and portion of form dealing password: <div class="form-group"> {{form::password('password', ['class' => 'form-control', 'placeholder' => 'password', 'tabindex' => '11'])}} </div...

linux - How to read data from serial port SICK LMS200? -

i read data sick lms200 lidar scanner through serial port. can see serial port /dev/ttyusb0. not know how data out of it. i've tried install the sick lidar matlab/c++ toolbox under ubuntu 14.04.3 lts using manual installation shown in toolbox manual. i untar file: $tar -xzvf sicktoolbox-1.0.1.tar.gz that's after running ./configure (not sure if it's helpfull) me@mypc:~/smetiste/sick/sicktoolbox-1.0.1$ ./configure checking bsd-compatible install... /usr/bin/install -c checking whether build environment sane... yes checking thread-safe mkdir -p... /bin/mkdir -p checking gawk... gawk checking whether make sets $(make)... yes checking g++... g++ checking c++ compiler default output file name... a.out checking whether c++ compiler works... yes checking whether cross compiling... no checking suffix of executables... checking suffix of object files... o checking whether using gnu c++ compiler... yes checking whether g++ accepts -g... yes checking style of include ...

Sql server: how to get the value from a sql string -

this sql statement not work. after exec (@strsql), see 0 or 1 result continue if statement doesn't work expected. doesn't take action if statement. also, there way make query dynamic check more 1 table? declare @strsql varchar(1000), @tablename varchar(100), @linkedserver varchar(100) set @tablename='tablename' set @linkedserver='linkservername' set @strsql='select count(1) tabexists dbc.tables tablekind=''t'' , databasename=''databasename'' , tablename=''tablename''' set @strsql = n'select tabexists openquery('+@linkedserver+', ''' + replace(@strsql, '''', '''''') + ''')' exec (@strsql) if @strsql = '0' --table not exist create table if @strsql = '1' --table exist delete data table instead try declare @sql nvarchar(max) = '' declare @tabexists bit; set @strsql = ...

android - In Branch.io, How to post a Deep-link with query parameters in facebook -

i´m having problems deep-link (using appending query parameters) in facebook post. when click, app opens data appended parameters not returned in referringparams when have app installed (android app). tried solution below without success.. https://github.com/branchmetrics/android-deferred-deep-linking-sdk#important-migration-to-v145 the same cenario works ios. does know how can resolve issue? this issue way you've set sessions. recommend following: inside application class, make sure inside oncreate , you're calling branch.getautoinstance(this) . make sure call branch.initsession inside deeplink activity user goes facebook. inside onnewintent , make sure there's ?link_id appended end, branch wont know link return without that.

Google API - How to create a link to a map? -

can pls advise on how create link google map created via javascript? can done? var map; function initmap() { map = new google.maps.map(document.getelementbyid('map'), { center: {lat: -34.397, lng: 150.644}, zoom: 8 }); i have normal link want go location on map have created in javascript. http://www.google.com/maps/place/49.46800006494457,17.11514008755796 https://www.google.com/maps/@-34.397,150.644,8z lat: -34.397, lng: 150.644, zoom: 8

Java Program Exercise code error -

so exercise asking write java class declares named constants represent number of kilometers ( 1.852 ) , number of miles ( 1.150779 ) in nautical mile. also, declare variable represent number of nautical miles , assign value it. compute , display, explanatory text, value of kilometers , in miles. assign value nautical miles variable, accept user input. output should user friendly. this code have come far import java.util.scanner; public class nauticalmileskc { public static void main(string[] args) { scanner getkm = new scanner(system.in); double kilometer; double nautical_mile; system.out.print("kilometer distance enter: "); kilometer = getkm.nextdouble(); nautical_mile = (kilometer * 540/1000); system.out.println("nautical mile equivalent :"); system.out.println(nautical_mile); } } i keep getting error , not running can me understand im doing wrong please i'm...

c# - Web Api is not working from Godaddy but working good in local -

i have uploaded site in 2 separate project. first part ui , second part web api. uploaded both on godaddy hosting panel unable call web api service. try sample valuescontroller not working. getting http/1.1 404 not found error when try call web api service web.config file code below <?xml version="1.0" encoding="utf-8"?> <!-- more information on how configure asp.net application, please visit http://go.microsoft.com/fwlink/?linkid=301879 --> <configuration> <configsections> <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> <!-- more information on entity framework configuration, visit http://go.micros...

excel vba - Referring to a different cell and extracting Substrings in VBA -

i have 2 sheets, "report" , "data". in "data" sheet values in column follows t-shirt.adidas.25.110 need take raw data , input them "report" sheet separate entities. ex. cell a1 read "t-shirt" cell b1 read "adidas" here have far. statement work 1 line. im not sure how loop it. dim cell object dim data range dim report range set report = worksheets("report").range("a2", range("a2").end(xldown)) set data = worksheets("data").range("a2", range("a2").end(xldown)) report .resize(1, 4) = split(worksheets("data").range("a2"), ".") end the macro needs work number of objects in data sheet. in advance! here 1 way loop: sub test() dim cell object dim data range dim report range dim long, temparray variant set data = worksheets("data").range("a2", worksheets("data").range("a2").end...

How do I group output when doing Non-recursive GNU make with -j option -

we have create , using custom non-recursive gnu make based build system. as such fast (intended), standard output gets jumbled when building dependencies using -j option. have tried using --output-sync option try , serialize output still not working desired. example: all: foo foo2 foo: bar bar2 bar3 @echo foo bar: @echo bar bar2: @echo bar2 bar3: @echo bar3 foo2: bar4 bar5 bar6 @echo foo2 bar4: @echo bar4 bar5: @echo bar5 bar6: @echo bar6 when run without -j sequential output: make bar bar2 bar3 foo bar4 bar5 bar6 foo2 when run -j get: make -j bar bar2 bar4 bar6 bar3 bar5 foo foo2 attempting fix issue tried using output-sync in make 4.0 make -j -otarget bar bar2 bar5 bar3 bar6 bar4 foo foo2 is there way force make group recipes when use -j option output is: bar bar2 bar3 foo bar4 bar5 bar6 foo2 update: way output when using -j indeed random each time run make, examples output of 1 specific run.

Java program how to read multiple Doubles in one line? -

alright,so i've got assignment requires me have method variable number of inputs string input. inputs have on 1 line in scanner, , method has return number of values entered,the average value,the max value,the min value,and string entered. this example of terminal window should like. please enter name of course: coursenamehere please enter scores csc 201 on single line , type -1 @ end 71 02 81 44 84 17 38 11 20 05 93 -1 course name : coursenamehere number of scores : 11 average score : 42.37 minimum score : 02 maximum score : 93 the average score has rounded 2 decimal places(which think can handle) problem me getting variable number of inputs scanned on single line,and how have program count number of inputs if i'm not hitting enter between inputs. have far.but have no idea go here. can ask sequential values,but aren't on same line i know put return in method? im new java please help this program calculates code without reading 1 line reading...

algorithm - Getting unique numbers efficiently? -

the problem in question check equation, example: a * b / c + d = x where - d unique numbers 1 - 4. now run through possibilities, skip when has duplicates, o(n^n), when should able solve o(n!) can't figure out how. is there algorithm this? based on wording (" a - d unique numbers 1 - 4 ") seems want algorithm generating possible permutations of set of numbers - in case set {1, 2, 3, 4} . given size of set, algorithm best implemented recursively: every element in set (from left right) generate permutations of remaining elements. note once last element, there's 1 possible order. this approach reduces problem of finding permutations of n items finding permutations of n-1 items. here's how on set {1, 2, 3} expect have 6 permutations: {1, 2, 3} 1 | {2, 3} 1 | 2 | {3} 1 | 2 | 3 1 | 3 | {2} 1 | 3 | 2 2 | {1, 3} 2 | 1 | {3} 2 | 1 | 3 2 | 3 | {1} 2 | 3 | 1 3 | {1, 2} 3 | 1 | {2} 3 | 1 | 2 3 | 2 | {1} 3 | 2 | 1 so algorithm gives following 6 ...

oracle - Oracle11g ORA-01403 No data found using Select Into -

i quite new oracle , have issue have been struggelig hours. sample: create table accounts (id number(10),balance number(16,3), status varchar2(50),owner_id number(10)); create table transactions (id number(10),amount number(16,3), trxn_date date, account_id number(10)); create table owner (id number(10), firstname varchar2(50),lastname varchar2(50)); insert accounts(id,balance,status,owner_id) values (1,1000,'open',10); insert accounts(id,balance,status,owner_id) values (2,5000,'closed',11); insert accounts(id,balance,status,owner_id) values (3,1000,'open',12); insert accounts(id,balance,status,owner_id) values (4,5000,'closed',13); insert accounts(id,balance,status,owner_id) values (5,1000,'open',14); insert accounts(id,balance,status,owner_id) values (6,5000,'closed',15); insert accounts(id,balance,status,owner_id) values (7,1000,'open',16); insert accounts(id,balance,status,owner_id) values (8,5000,'clos...

c - Why is temporary storage needed in sorting array? -

the piece of code : if(a[i] > a[j]){ temp = a[i]; a[i] = a[j]; a[j] = temp; } why temp variable has used ? when try without temp : if(a[i] > a[j]){ a[i] = a[j]; } it wont work, before working when compare other variables if don't have temp variable temp = a[i]; a[i] = a[j]; a[j] = temp; then lose value in a[i] (previous assignment a[i] = a[j] . there way swap values without having using temporal value. solution here . in c this: int x = 10, y = 5; // code swap 'x' (1010) , 'y' (0101) x = x ^ y; // x becomes 15 (1111) y = x ^ y; // y becomes 10 (1010) x = x ^ y; // x becomes 5 (0101) using xor operator. code here , go link find entire explanation , possible drawbacks of using solution.

css - media query css3 window aspect ratio -

is there way window aspect ratio in css media query? have found device-aspect-ratio , , device-pixel-ratio , seems possible several breakpoints based on pixel size , number of pixels , device width. not simpler make website relative browser window because browser window spans on whole device on mobile phones (for now) on pc can resize window wishes? so there workaround or need server/client side programming? thank enigma. english not first language.

Tutorial for TYPO3 Extension tt_products -

i'm trying install shop on typo3 v6.2.10. general question is, if has set shop tt_products on 6.2 lts , how can configure use productcategories navigation. (multilevel) 4 subcategories. hope can send me tipps , tutorials how can set shop. best regards chris at first must install extension mbi_products_categories provides hierarchical categories , many categories each product. you must enhance default setup of file setup.txt in tt_products in order more 1 hiearchy level shown. conf.tt_products_cat.all { hierarchytiers = 4 }

itunesconnect - Fail to open ssh session. (16) Xcode 7.0.1 -

Image
how fix i've tried every single link or previous question asked on here please don't direct me link. can please tell me how fixed it. appreciated. turned firewall on had been allows off. turned on tell fire wall accept these application (xcode , application loader). , still same thing should keep off think.

java - Calling thread.notify() on a callers thread that is no longer available -

on page link on first example, b.wait() called. happend if b.wait() never called, , main thread allowed finish before b thread able call notify()? exception happen or funky? not find on internet specific because don't know how search situation. thanks! notify() doesn't have whether target thread still running, or indeed whether target thread @ all. happen ... nothing.

apache - Not getting Reply from IIS server -

i trying migrate perl cgi script apache iis. when post data url not able reply back.. how should debug/fix it? hosted on iis - not working * xyz-macbook-pro:desktop xyz$ curl -v -x post -d@data.json "http://abc-q888gab4.cloudapp.net:1234/dseb/ecws.pl" -m 5 * hostname not found in dns cache * trying ***.***.***.*** ... * connected abc-q888gab4.cloudapp.net (***.***.*.* ) port 1234 (#0) > post /dseb/ecws.pl http/1.1 > user-agent: curl/7.37.1 > host: abc-q888gab4.cloudapp.net:1234 > accept: */* > content-length: 388 > content-type: application/x-www-form-urlencoded > * upload sent off: 388 out of 388 bytes * operation timed out after 5005 milliseconds 0 bytes received * closing connection 0 curl: (28) operation timed out after 5005 milliseconds 0 bytes received hosted on apache -working fine curl -v -x post -d "sad" http://<some-ip>:6421/cgi-bin /ecws/ecws....

c# - Can I change the behavior of maximizing a windows form? -

my c# form (visual studio 2008) has advanced mode more bells , whistles (larger form size) , normal mode (smaller form size). if user clicks on maximize button, i'd form toggle either advanced mode or normal mode, instead of maximizing form itself. is possible? i not believe there winforms event triggered maximize button. last time checked (years ago), can go down winapi level. protected override void wndproc( ref message m ) { base.wndproc(ref m); // call overwritten method first if( m.msg == 0x0112 ) // wm_syscommand { if (m.wparam == new intptr( 0xf030 ) ) //window being maximized { // things } } }

r - How are results of complete.cases() and data[is.na(data)] <- 0 different? -

i have dataframe data , after several computations on it, final dataframe df.final has missing values in it. before going ahead further calculations on df.final , better off making missing values zero's by data[id.na(data)] <- 0 as mentioned here @ how replace na values zeros in r? , or doing df.final <- df.final[complete.cases(df.final), ] # considering one's without na be more beneficial? how 2 different? if set na zero, effect on calculations if measured , got zero . if you're measuring temperatures in july, you'll results if had few frosty days in there. average temperature lower. if set na.rm=t or use complete.cases , effect if that measurement never happened (which case, really). our average temperature in july average days did measure. if have few isolated na values ( sum(is.na()) ) might want set them 0 (or other sensible value, in example average temperature in july might good). i set 0 if there vanishingly few (so ...

Why is "no code allowed to be all ones" in libjpeg's Huffman decoding? -

i'm trying satisfy myself meteosat images i'm getting ftp server valid images. doubt arises because tools i've used far complain "bogus huffman table definition" - yet when comment out error message, image appears quite plausible (a greyscale segment of earth's disc). from https://github.com/libjpeg-turbo/libjpeg-turbo/blob/jpeg-8d/jdhuff.c#l379 : while (huffsize[p]) { while (((int) huffsize[p]) == si) { huffcode[p++] = code; code++; } /* code 1 more last code used codelength si; * must still fit in si bits, since no code allowed ones. */ if (((int32) code) >= (((int32) 1) << si)) errexit(cinfo, jerr_bad_huff_table); code <<= 1; si++; } if comment out check, or add check huffsize[p] nonzero (as in containing loop's controlling expression), djpeg manages convert image bmp can view few problems. why comment claim all-ones codes not allowed? it claims because not allowed. doesn't mean th...

iOS Simulator NSPOSIXErrorDomain Code=2 after upgrading to OSX El Capitan -

after upgraded yosemite el capitan, simulator can no longer connect local server. same simulator has no problems connecting remote production server. i'm sure local server running fine safari can connect using same port. here's error i'm getting in xcode: error domain=nsposixerrordomain code=2 "no such file or directory" userinfo={nserrorfailingurlstringkey=http://localhost:9000/sites, nserrorfailingurlkey=http://localhost:9000/site, _kcfstreamerrorcodekey=2, _kcfstreamerrordomainkey=1} i'm running xcode 7.0.1 simulator ios 9.0 this known bug according xcode 7.1 beta 3 release notes: "when running in ios simulator, app cannot communicate tcp/ip services locally hosted mac. (22453539)"

Argparse set_defaults for sub-parsers broken beyond Python 2.7.6? -

i have application using argparse broken latest versions of python. no longer able alter defaults sub-commands. my app has various modules , optional gui. gui calls modules via sub-commands, , there ini file may alter argument defaults. the gui has created parser , sub-parsers, passing arguments set gui user. options in ini file may override defaults in sub-parsers. this works in 2.7.6, broken later releases due apparent change in argparse. import argparse # create top-level parser parser = argparse.argumentparser(prog='prog') parser.add_argument('--foo', action='store_true', dest='_foo') subparsers = parser.add_subparsers(help='sub-command help') # create parser "a" command parser_a = subparsers.add_parser('a', help='a help') parser_a.add_argument('--bar', type=int, default=0, dest='_bar') #use ini file alter default d_ini = {'_bar': '1'} parser.set_defaults(**d_ini) # pa...

What is getCompoundDrawables() in Android? -

how getcompounddrawables() used in android: if(medittext.getcompounddrawables()[2] == null) medittext.setcompounddrawableswithintrinsicbounds(0, 0, r.drawable.ic_face, 0); i wanted check whether there drawable in edittext @ end of it. if condition giving correct result? yes correct way find out whether compound drawable set or not.

ggplot2 - How can I manipulate a ggplot in R to allow extra room on lhs for angle=45 long x-axis labels? -

this question has answer here: ggplot2 plot area margins? 1 answer i have several geom_bar ggplots have long names x-axis text. if plot them @ angle=90, takes lot of room @ bottom of graph, trying angle=45. causes left hand side of first label cut off. there way increase left margin? (not allowed post image example) ggplot(aes(x = cm, y = ahead_aadt), data = sbt) + geom_point( ) + geom_line() + ggtitle("ahead aadt traffic counts on 101 in s santa barbara cty") + theme(axis.text.x = element_text(angle=45, size = 9, color = "black", face = "plain", vjust = 1, hjust = 1), panel.grid.major.x = element_line(colour = "black", linetype = "dotted")) + xlab("cumulative mileage") + ylab("ahead aadt") + scale_x_continuous(breaks = sbt$cm, labels...

c - Why do we need to use double pointer to access a 2-D array? -

i trying understand multidimensional array , pointers, wrote small program understand concept: #include<stdio.h> void show(int arr[][2]); int main() { int z[2][2] = { { 1, 2 }, {3, 4 } }; show(z); } void show(int arr[][2]) { printf("value of arr = %d", arr); printf("\n\nvalue of &arr[0]0] = %d", &arr[0][0]); } this code fragment prints same address makes sense, when edit show function: void show(int arr[][2]) { printf("value of *arr = %d", *arr); printf("\n\nvalue of arr[0]0] = %d", arr[0][0]); } *arr still prints same address while arr[0][0] expected prints integer value , want know why need use **arr int value , if arr storing address should dereferenced *arr, isn't ? please having hard time understanding concept.. in advance. if @ memory layout of 2d array, things might become little bit clearer. you have variable defined as: int z[2][2] = {{1, 2}, {3, ...

c++ - Random and Randomize Function -

how random , randomize functions work? please me! #include<iostream.h> #include<stdlib.h> const int low = 15; void main() { randomize(); int point=10, number; for(int i=1; i<=4; i++) { number = low + random(point); cout<<number<<":"; point--; } } what different outputs can predicted program? , how? explain. have got 4 options code 1) 24:23:22:21: 2) 24:25:23:21 3) 21:22:23:24 4) 22:23:21:24 , haven't got of these output, there must basic format or solve these types of programs. please help. have referred books telling these type of programs can't understand working of these type of programs. short random(short num) macro uses rand() return random number between 0 , num-1. randomize picks current time of system clock , uses seed (initial value) random number generator, output sequence of rand() different each time run program. rand called pseudo random numbe...

c++ - the output of cv::imwrite vs cv::imencode -

does cv::imencode have identical behavior cv::imwrite when converting cv::mat jpeg? know first 1 write buffer , second write file asking written content. when call cv::imwrite() did not call cv::imencode() internally! both functions uses internal imageencoder . take @ loadsave.cpp

c# - Not able to register FMOD Plugin on iOS (using Unity3d) -

i created fmod plugin on c++ , generated both dynamic library (.dylib) , static library (.a). i able use dynamic library fmod studio gui , i’m able use in unity3d mac simulator (which picks dynamic library assets/plugins. i’m having problems getting things working on iphone. for ios, need use static library (*.a), means have manually load plugin in unity3d (c#), generate xcode project , installed on iphone. tried implementing basic function in c , load on c# , works fine. means static library generated , can load on iphone , use it. can’t working fmod description function. here code, when run in iphone, i’m getting error: “fmoddescptr intptr.zero” thanks in advanced help! i’ve been struggling 5 days , haven’t been able solve it. c++ side: f_declspec f_dllexport int f_stdcall aigoogetdspdescription2(fmod_dsp_description *fmoddesc) { // defines user interface, maximum distance knob static float distance_mapping_values[] = { 0, 1, 5, 20, 100, 500, 10000 }; static fl...

scala nested case classes generate strange type error -

i'm trying use case class has 1 attribute reference case class. there conditions construct object strange type errors. so works fine. case class foo(a:int) case class bar(b:foo, c:foo) val t = bar(foo(1),foo(2)) //t: bar = bar(foo(1),foo(2)) when nest object, there doesn't seem problem object w { case class foo(a:int) case class bar(b:foo, c:foo) } i can create object val t = w.bar(w.foo(1),w.foo(2)) however, when try construct object defined foo, gives me crazy type error. val f = w.foo(1) w.bar(f,f) // error: type mismatch; // found : w.foo // required: w.foo // w.bar(f,f) any ideas? scala 2.10.5 this can happen if try on console, while redefine of classes. if type in console: scala> :paste // entering paste mode (ctrl-d finish) case class foo(a:int) case class bar(b:foo, c:foo) val t = bar(foo(1),foo(2)) object w { case class foo(a:int) case class bar(b:foo, c:foo) } // exiting paste mode, interpret...

javascript - Retrieving HTML metadata for image instead of downloading image -

i trying use cheerio node.js request library retrieve metadata images. looks when make http request url ends in .jpg, .png, etc, send whole file , can't access html in response. so, question is, given url image, how read html or metadata instead of downloading whole image file upon making request url? for example, here simple code have: var request = require('request'); var cheerio = require('cheerio'); // cheerio used parse html on server, jquery server request('http://l.yimg.com/os/mit/media/m/content_index/images/sidekick_tv_news-2e9c408.png',function(err,response,body){ var $ = cheerio.load(body); //here seems body not html data pertaining image - want typical html response, not picture file }); does know talking about? for starters can use image url in img element: var img = cheerio('<img src="' + imageurl + '"></img>'); or var img = cheerio.load(...

php - fetch values from database and display result in array -

i have cart table looks id catid catname userid productid prodimg prodname prodsize prodcost quantity datee timee totalamount 1 1 cn1 1 1 abc p1 small 10 1 3/10/2015 10:00am 10 2 1 cn1 1 1 abc p1 medium 20 1 4/10/2015 10:00am 20 3 1 cn1 1 1 abc p1 large 30 1 3/10/2015 10:00am 30 4 1 cn1 1 1 abc p1 perpiece 5 1 3/10/2015 10:00am 5 5 1 cn1 1 2 cdf p2 small 6 1 3/10/2015 10:00am 6 6 1 cn1 1 2 cdf p2 large 14 1 4/10/2015 10:00am 14 7 1 cn1 2 1 abc p1 small 10 2 3/10/2015 ...

iphone - iOS app memory increases on loading image (5 MB) on image view -

Image
i trying load image (5.4 mb) of resolution 4923 x 9405 on image view. there drastic increase in memory allocation of app load image. memory allocation before loading image around 17 mb, whereas reaches 198 mb when load image on image view. assuming app should consume memory of 5 mb while loading image proved wrong when analysed memory allocations of app. my questions why ios app shows such behaviour? is there way identify, actual memory allocation of app when such large images loaded? you can check attached screenshots memory allocations before loading image , after loading image.

jsp - Is usage of <c:out> tag with escapeXml="false" equivalent to not using <c:out> tag? -

i have read using <c:out> tag prevent xss attacks cases, example, displaying units superscript (kg/m 3 ) using <c:out> displayed plain text sup tag ( kg/m<sup>3</sup>) . in order display properly, escapexml="false" has used. <c:out value="${units}" escapexml="false></c:out> but wondering whether using <c:out> tag escapexml="false" equivalent not using <c:out> tag itself? <c:out value="${units}" escapexml="false" /> this indeed equivalent not using <c:out> , only in jsp 2.0 or newer. ${units} in older jsp versions (jsp 1.x), el in template text above not supported , therefore <c:out> way print el expressions. see also: xss prevention in jsp/servlet web application el expressions not evaluated in jsp

asp.net mvc 4 - Make chart using model -

a have following model using system; using system.collections.generic; using system.componentmodel.dataannotations; using system.linq; using system.web; namespace goonwork.models { public class skill { [key] public int id { get; set; } public datetime addedon { get; set; } public datetime modifiedon { get; set; } public int? descriptionid { get; set; } public virtual description descriptions { get; set; } public int? levelid { get; set; } public virtual level levels { get; set; } public string userid { get; set; } public virtual applicationuser user { get; set; } } } and want create chart level (xfields) , description (yfields) skill model. fields description , level connected other tables. have chart view model using system; using system.collections.generic; using system.linq; using system.web; using system.web.helpers; namespace goonwork.models { public class chartview...

shell - the meta character in linux soft quoting -

[root@z ~]# echo \n n [root@z ~]# echo "\n" \n [root@z ~]# echo '\n' \n and [root@z ~]# echo '\\' \\ [root@z ~]# echo "\\" \ [root@z ~]# echo \\ \ what's problem? soft quoting can disable \ or not??? in order interpret escape sequences many echo versions must invoked argument -e described posix specifications under "on xsi-conformant systems.. " in page echo . circumvent potential inconsistency instead use more portable printf utility. here examples: output actual newline character: printf "\n" output uninterpreted "\n" character string: printf "\\\n" if absolutely want use echo still, can pass -e option follows: output actual newline character: echo -ne "\n" output uninterpreted "\n" character string: echo -n "\n" single ticks verse quotes have no bearing on operation of escape sequences. differentiation of single ticks verse quotes...

user interface - python show tooltip window on click -

there command in autohotkey shows tooltip message on top of screen. want on python. in more details need make application, work in background, tracking keyboard. on specific hotkey should show on top of screen message without grabbing focus other application. , should remove message after conditions (e.g. mouse moving). should work full screen apps too. i couldn't find how on python, or libraries should use. need help. global tooltips created via winapi createwindowex tooltips_class window class. there some examples can adapt. see the autohotkey implementation . shell tray tooltips created via shell_notifyicon . working example: wontoncc/balloontip.py , the autohotkey implementation .

javascript - Phantomjs update values of var? -

i have below phantomjs program website contains drop down list ddllevel3 var page = require('webpage').create(); page.onconsolemessage = function(str) { console.log(str); } var z=0; var z_l=0; var op1='#ddldivision' var op2='#ddllevel1' var op3='#ddllevel2' var op4='#ddllevel3' function selectoption(selector, optionindex) { page.evaluate(function(selector, optionindex){ var op4='#ddllevel3' var sel = document.queryselector(selector); var sel4 = document.queryselector(op4); sel.selectedindex = optionindex; var event = document.createevent("uievents"); // see update below event.inituievent("change", true, false); sel.dispatchevent(event); this.dispatchevent(event); z_l=sel4.length; console.log("len: "sel4.length+" "+z_l); }, selector, optionindex); } page.open(...{ function loop4 () { selectop...

android - Using butterknife for a library project with buildToolsVersion = '26.0.1' -

when use butterknife in library 9.0.0-snapshot getting error : error:execution failed task ':app:transformclasseswithdexbuilderfordebug'. com.android.build.api.transform.transformexception: org.gradle.tooling.buildexception: com.android.dx.cf.code.simexception: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26) buildscript { repositories { jcenter() google() maven { url 'https://maven.fabric.io/public' } maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-beta4' classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1" classpath "com.jakewharton:butterknife-gradle-plugin:9.0.0-snapshot" classpath 'io.fabric.tools:gradle:1.+' // classpath 'me.tatarka:gradle-retrolambda:3.7.0' // note: not place a...

python 2.7 - pyinsataller misses libaries when building programms using pyzmq -

i try use pyinstaller build executable of worker client. client uses zmq communicate server. unfortunatelly pyinstaller seems miss libaries on build when zmq present. here minimalized example on win7 with anaconda 2 (python 2.7.13) zmq 16.0.2 pyinstaller 3.3.dev0 pyinstaller installed using pip , working python files not using zmq. [update] updated pyinstaller according 9dogs comment, see info section. latest version additional warning every time call pyinstaller c:\zmqtest>pyinstaller -v 16 warning: internal error: pywin32 import introduced 3.3.dev0+ga43a5d23 content of zmqtest.py file: import zmq port = "5551" context = zmq.context() client = context.socket(zmq.req) client.setsockopt(zmq.constants.linger, 1) print 'connecting...' client.connect ("tcp://localhost:%s" % port) msgdict={} msgdict['foo']='bar' print 'send message...' client.send_json(msgdict) print 'recive message...' msgdict = client.recv_js...