Posts

Showing posts from March, 2012

git config - Is it possible to disable a "dangerous" command line option in git? -

git config - Is it possible to disable a "dangerous" command line option in git? - by habit, i'll work on alter in repo, , add/commit in 1 shot using git commit -am 'my commit message' there times when want add together few of modified files, i'll issue preparatory git add commands meticulously set-up staging area, , separate ready-to-commit changes half-baked changes. then, i'll fat-finger whole thing issuing same git commit -am '...' command do. would there way me disable git commit -a option, and/or issue warning when utilize -a switch? want train myself out of sketchy habit... create wrapper script named git grab bad commands , forwards ones on real git . set before in $path : #!/bin/bash arg in "${@}"; if [ "${arg}" = "-am" ]; echo "hey! don’t that!" 1>&2 exit 1 fi done exec /usr/bin/git "${@}" almost git commands work fine:

MySQL Workbench 6.1 - Error importing recordset -

MySQL Workbench 6.1 - Error importing recordset - i'm going getting new computer , don't want lose of info have entered in tables, decided test out feature allows export , import csv files. exported table (data transferred microsoft excel in csv file), when opened file in microsoft excel , added few rows , tried import in mysql workbench, got next error: "error importing recordset error calling python module function sqlideutils.importrecordsetdatafromfile" i've searched on info on this, can't find solutions. know i'm doing wrong? in workbench, open mysql connection , navigate [server] --> [data export]. there several backup options here, including saving info individual file or folder. take databases want export, , click [start export]. if ever prefer using excel editing , such, utilize mysql excel plugin access mysql databases within excel. however, don't think need here. mysql mysql-workbench

Javascript floating point number usable ranges -

Javascript floating point number usable ranges - i got infinitely zooming grid work , tried out how much can zoom. worked fine until around 15,000,000,000,000x magnification got jerky , didn't move right anymore figured had nail limit of precision of whatever variable type using. tried zooming out , expected similar limit 5 minutes later, @ magnification of 0.00000-insert 100 zeros here-0014829095701452545 still doing great. if 1 1m in relation planck length within planck length within planck length. crazy! so not problem question curiosity 1 - kind of types javascript utilize floats? , why capable of using much longer tiny numbers big numbers? the problem precision loss is. when have huge number, start losing precision around units, can cause huge problems. with tiny number, precision loss @ low decimal places, you'd have precision loss due not having plenty digits store number anyway. there's no real problem here. does create sense? it's dif

MySQL character_set_server won't take effect -

MySQL character_set_server won't take effect - i'm trying have mysql server utilize utf8 default collation , character set. able set except character_set_server takes latin1 value. i have set 'character-set-server=utf8' in my.cnf, when run show variables character_set_server , latin1. if bring me help appreciated. btw: i'm running mysql 5.6.19 on macos 10.9 thanks please, seek alter character set of table : mysql> set global character_set_server=utf8; mysql> set session character_set_server=utf8; and alter table charcter set: mysql> alter table test_latin1 default charset utf8; mysql

css - select element which have specific attribute -

css - select element which have specific attribute - i've input buttons without class or id , have onclick attr on this: <input type="button" onclick="myfunc();" /> and there other input type buttons , want style buttons have onclick attribute. so, here can this: input[onclick="myfunc();"]{color: red;} but in onclick there may function myfunc(), thisfunc(), or anyfunc(). so how can select input buttons have onclick attribute. the value can omitted: input[onclick]{color: red;} on unrelated note, seems interesting utilize case. utilize this, perhaps styling border or instead of text, in order highlight form elements (or other elements) event handler attributes, "debugging" purposes. css css-selectors

javascript - getjson jquery doesn't work in phonegap android -

javascript - getjson jquery doesn't work in phonegap android - i'm trying retrieve json info local server in phonegap android app. i've set submit input data.i using method $.ajax in jquery that. problem when click submit, nil displayed page refreshed. don't see how prepare this. could please help me? in advance. (ps: json returned right , i've changed access in config.xml) here total code : <!doctype html> <html> <head> <title>application test</title> <script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"></script> <link href="css/jquery.mobile-1.0rc1.min.css" rel="stylesheet" type="text/css" /> <script src="js/jquery-1.6.4.js"></script> <script src="js/jquery.mobile-1.0rc1.min.js"></script> <script> document.addeventlistener("deviceready", onde

Restlet - Status service driven by the requested resource -

Restlet - Status service driven by the requested resource - i developing next rest inquiries restlet. http://localhost:8182/employees/{empid} http://localhost:8182/timeline/{empid} i have application overridden createinbounroot has router attached employees/{empid} , timeline/{empid} . in application, able set 1 status service, employeestatusservice . how tell application utilize different status service depending on resource requested ? or, there different way of doing ? my application: public class app1 extends application { public catalogueapplication() { this.setstatusservice(new employeestatusservice()); //this.setstatusservice(new timelinestatusservice()); } @override public restlet createinboundroot() { router router = new router(getcontext()); router.attach("/employees/{empid}", employees.class); router.attach("/timeline/{empid}", timeline.class); homecoming router;

Rails Validation for Username and Email -

Rails Validation for Username and Email - i have next validation rules username , email. validates :username, presence: {:message => "please take username.", on: :update}, uniqueness: {:message => "username exisits. please select different one."}, length: {in: 3..15, :message => "username should 3-5 characters long", :allow_blank => true} validates :email, presence: {:message => "please come in email address."}, uniqueness: {:message => "email address exisits. please login!"} validate :email_regex def email_regex if email.present? , not email.match(/\a[^@\s]+@([^@.\s]+\.)+[^@.\s]+\z/) errors.add :email, "please come in valid email address." end end for username: not want allow other - little letters, dot, numbers. do need write different validate message email_regex or there simplied version can utilize append

spring - Java 8 lambda and extension of interfaces with abstract class -

spring - Java 8 lambda and extension of interfaces with abstract class - say want declare spring's rowmapper , not create dynamic class, implement abstract class implements rowmapper. method signature: sqlprocedure#declarerowmapper(rowmapper<?> rowmapper); customrowmapper.java: public abstract class customrowmapper<t> implements rowmapper<t> { protected a = new a(); } the old java way write: sqlproc.declarerowmapper(new customrowmapper<object>() { @override public object maprow(resultset rs, int rownum) { a.dosomething(rs, rownum); homecoming new object(); } }); is possible accomplish same thing lambda expressions? this: sqlproc.declarerowmapper((rs, rownum) -> { a.dosomething(rs, rownum); homecoming new object(); }); but compile error saying a cannot resolved . it's because java sees implementation of rowmapper#maprow method, not customrowmapper#maprow . how tell java utilize

C++ compile-type resource owner assertion -

C++ compile-type resource owner assertion - class resource; class device { ... public: resource createresource(); bindresource(const resource&); }; int main() { device dev; device oops; auto res = dev.createresource(); dev.bindresource(res); // okay; dev created resource oops.bindresource(res); // error: oops did not create resource } programme not compile can done @ compile-time no runtime overhead , similar syntax? example, device abstraction of direct3d renderer; can't share resources, should compile time error if try. there workaround, uses __counter__ macro. though not provided standard, msvc , gcc back upwards it. macro relates integer value, incremented every time utilize macro in translation unit. so, implementation following: // device.h #define device device<__counter__> template<int n> class device { public: class resource{}; resource createresource() { homecoming resource(); } v

php - Connecting to remote MS SQL database through SQLSRV driver -

php - Connecting to remote MS SQL database through SQLSRV driver - i'm trying connect remote ms sql db (not localhost), everytime timeouts before sucseeds... i'm pretty sure problem $servername variable, there anyway check via plesk parallels value of that? <?php $servername = "server's ip address/database name"; //servername\instancename $connectioninfo = array( "database"=>"database name", "uid"=>"dbusername", "pwd"=>"dbpassword"); $conn = sqlsrv_connect( $servername, $connectioninfo); if( $conn ) { echo "connection established.<br />"; }else{ echo "connection not established.<br />"; die( print_r( sqlsrv_errors(), true)); } ?> try inject precise port number servername <?php $servername=127.0.0.1\sqlexpress,1433; //networkaddr\instancena

contextmenu - Perl Right-Click Menu on STDOUT only works with System Command -

contextmenu - Perl Right-Click Menu on STDOUT only works with System Command - i want right-click , standard command-prompt context menu perl script's stdout/stdin. yet works if i've first "connected system". why? this not have right-click menu: print 'hello world'; # `dir`; # *needs* - commented out doesn't work <stdin>; # hold window open yet does: print 'hello world'; `dir`; # in backticks or system() work <stdin>; # hold window open theories why context menu doesn't show up old version of perl issue i'm stuck till upgrade (if ever) something weird not beingness able pass in command line arguments because windows doesn't giving access details file-types anymore? (yes know there registry fix, if prepare on mine i'll need prepare on 6 other computers) some other random issue? setup windows 7 perl 5.6.0 no libraries (yea know - i'm st

indexing - Tracking indexes in SQL server -

indexing - Tracking indexes in SQL server - i'm looking maintain track of indexes in db. maintain track of names. way know how query , insert result(indexes) in table. wondering if there other ways. how guys maintain track of indexes? thanks you can list table/index names, , basic usage info this: use {databasename} go select distinct object_name(sis.object_id) tablename, si.name indexname, sis.user_seeks, sis.user_scans, sis.user_lookups, sis.user_updates sys.dm_db_index_usage_stats sis inner bring together sys.indexes si on sis.object_id = si.object_id , sis.index_id = si.index_id --where sis.database_id = db_id('yourdbnamehere') --and sis.object_id = object_id('yourtablenamehere'); go link source. sql-server indexing tracking monitor

python - How to filter a non periodic function -

python - How to filter a non periodic function - i'm new python programming , wanted know if there way create high-pass filter periodic function so: import numpy np scipy.signal import lfilter, firwin, butter pylab import figure, plot, show sample_rate = .0167 nsamples = 480 f_1hz = 1.38e-4 a_1hz = 1.0 f_15hz = .0011 a_15hz = .5 t = np.arange(nsamples) / sample_rate signal = a_1hz * np.sin(2*np.pi*f_1hz*t) + a_15hz*np.sin(2*np.pi*f_15hz*t) signal[::120] = 2 figure(1) plot(t,signal,'b') show() i want maintain higher frequency ( .0011 hz) spikes of 2 @ spots, amplitudes of .0011 hz needs remain @ .5 , spikes need remain @ amplitude of 2, normalizing isn't option. moreover, if made function have spikes of 2 @ non-periodic intervals(say spike @ signal[prime numbers]) still filter correctly, right amplitudes? the reply quite no. the reason behind blunt reply spikes (which have value of 2) stand on top of signal. if filter away, signal amplitude m

javascript - D3JS .call() Exception -

javascript - D3JS .call() Exception - i creating d3js chain .call() @ end. here current chain foo.selectall('svg') .data(data) .enter() .append('svg') .classed('someclass', true) .call(somefunc); when reaches .call() goes d3js function d3_selectionprototype.call = function(callback) { var args = d3_array(arguments); callback.apply(args[0] = this, args); homecoming this; }; the this not contain , returning exception of message: cannot read property length of undefined . unfortunate thing happens sporadically. know of why or how happening? edit i using javascript framework implements view composition. current d3js phone call beingness made when model driving view first beingness called. i solved issue on own , leave assist may have same issue in future. added edit question helps gives more context total issue. the solution since d3js chain beingness called when model driving view setting there wa

java - JMF and Incoming tcp audio -

java - JMF and Incoming tcp audio - i'm on project of voip. i've sound stream on tcp mobile computer. need stream , send rtp (with sip) device. i can talk device in sip jain-sip, can't send audio, don't know how this. i'm using jmf, define custom datasource can't create processor it... any ideas ? thanks helping :) code : inside rtplayer constructor : datasrc = new datasource(is, contenttype); datasrc.connect(); format[] format = { new audioformat(audioformat.linear, samplerate, samplesizeinbits, channel) }; processormodel pm = new processormodel(datasrc, format, new contentdescriptor(contenttype)); p = manager.createrealizedprocessor(pm); custom datasource : import java.io.ioexception; import java.io.inputstream; import javax.media.duration; import javax.media.time; import javax.media.protocol.contentdescriptor; import javax.media.protocol.inputsourcestream; import javax.media.protocol.pulldatasource; import javax.media.protocol.pullso

what is the addressing mode of dec with memory? (assembly x86) -

what is the addressing mode of dec with memory? (assembly x86) - what addressing mode operations: dec z-2 mov bx, offset z+3 ? find of scenarios except ones :/ thanks allot! the first instruction dec z-2 uses memory operand. think many assemblers prefer dec word [z-2] . written way instruction decrements word before label/variable z. the sec instruction mov bx,offset z+3 uses immediate operand value 3 more address of label/variable z. doesn't approach memory address calculated. assembly x86

python - ImportError: libpng16.so.16: cannot open shared object file: No such file or directory -

python - ImportError: libpng16.so.16: cannot open shared object file: No such file or directory - although has come topic before has not been answered. next import error have installed canopy epd , after installed it, keeps coming next error: ipython 2.1.0 -- enhanced interactive python. ? -> introduction , overview of ipython's features. %quickref -> quick reference. help -> python's own help system. object? -> details 'object', utilize 'object??' details. [terminalipythonapp] warning | eventloop or matplotlib integration failed. matplotlib installed? --------------------------------------------------------------------------- importerror traceback (most recent phone call last) /home/rhys/documents/uni_work/year_2_research_placement/user/lib/python2.7/site-packages/ipython/core/shellapp.pyc in <lambda>(key) 231 shell = self.shell 232 if self.pylab: --> 233

java - Customizing ReloadableResourceBundleMessageSource -

java - Customizing ReloadableResourceBundleMessageSource - i using spring3 along jstl. regarding internationalization. in jsp i've defined - , using reloadableresourcebundlemessagesource class of spring accomplish internationalization. want customize reloadableresourcebundlemessagesource pick value of key 'error.name.100' if present, else pick value key 'error.name'. if key 'error.address.100' not present, pick value of key 'error.address' can achievable? java spring jstl

azure - Unable to Install NServiceBus Host Windows Service -

azure - Unable to Install NServiceBus Host Windows Service - i'm attempting follow instructions install windows service host using nservicebus.host.exe videostore sample app. i'm next instructions web site. my application runs fine when doing f5 session in visual studio. it's hosting using console app mode host. when effort utilize command line perform installation, multiple errors. the command line i'm running is: nservicebus.host.exe /install /servicename:"videostore.sales" /displayname:"videostore.sales" /description:"endpoint videostore.sales" /endpointconfigurationtype:"videostore.sales.endpointconfig, videostore.sales" /username:".\mysvc" /password:"mypassword" nservicebus.production running resulted in next exception: initializing installer in install appdomain unhandled exception: system.invalidoperationexception: sequence contains more 1 matching element @

javascript - Parse hashtags in a string, except for anchor tags -

javascript - Parse hashtags in a string, except for anchor tags - i convert instances of hashtag ( # ) in given string html tag: for example: #test should convert <a>#test</a> test#test should not convert <a href="#test">#test</a> should not convert <p>#test</p> should become <p><a>#test</a></p> <b>#test</b> should become <b><a>#test</a></b> something next start (tested in vim): :% subst :<[^>|a>]\+>\zs\(#[^<]\+\)\ze:<a>\1</a>: it meet lastly 3 requirements. as first two, broad, guess, because of test#test . @ work , can't spend much time on now. by way, people said, regexps should not used parse html/xml stuff. perhaps still ok if larn , study, though. edit: other regex matches first 2 requirements: %s:\(\w\|<[^>]\+>\|"\)\@<!\(#[^ ]\+\):<a>\2<\/a>: it add together <a>

Lotus Notes: Is it possible to create a view that excludes documents in all folders other than Inbox? -

Lotus Notes: Is it possible to create a view that excludes documents in all folders other than Inbox? - i aware can exclude folders - have name them. need view show documents in inbox, doesn't need updating everytime create new folder. any help appreciated! :) it not possible directly. there no formulas help build select statement documents in inbox. however, have agent run on scheduled basis (maybe every 5-10 minutes) update documents , flag them if in inbox. view need select documents have flag set. updated umeli pointed out, flag needs unset when documents moved out of inbox. here's modified script: for example: dim s new notessession dim db notesdatabase dim view notesview dim doc notesdocument dim allentriesinbox notesviewentrycollection dim allentriesflagged notesviewentrycollection set s = new notessession set db = s.currentdatabase set view = db.getview("($inbox)") set viewflagged = db.getview("isininboxview") set all

oauth - Export data from a Learning Management System -

oauth - Export data from a Learning Management System - i'm looking integrating learning management systems / school management systems powerschool, skyward, , moodle. there 3 approaches see: screen scraping, parsing exported grades (csv files), , integration through public api. does have experience getting info lmss? info on apis seems pretty scarce , avoid screen scraping. oauth screen-scraping system-integration

c - Union nested in a structure returning garbage value -

c - Union nested in a structure returning garbage value - everything working fine, except nested union not getting updated. using mingw compiler. learning coding regarding c , trying out nested union , other stuff when problem came up. please tell me error of code, along possible debugging. couldn't find wrong it. output: a:3 b:3 l.a: 8 l.b: 5 union: -536870912 #include<stdio.h> #include<conio.h> typedef struct { int a; int b; } two; typedef union { int c; float d; } ad; typedef struct { int a; int b; 2 l; advertisement n; /*this nested union not getting updated*/ } one; void trr(one *p); int main() { 1 tr={2,3,{4,5},{.d=5.43}}; trr(&tr); printf("a: %d\nb: %d\nl.a: %d\nl.b: %d\nunion: %d",tr.a,tr.b,tr.l.a,tr.l.b,tr.n.d); homecoming 0; } void trr(one *p) { p->a=(*p).a+1; p->l.a=p->l.a*2; } tr.n.d has type float . %d format specifier tells printf treat int however. seek changing format specif

mysql - Getting a 64-bit Unix Timestamp using 32-bit PHP -

mysql - Getting a 64-bit Unix Timestamp using 32-bit PHP - i want timestamp database entries, mysql native types don't seem sufficient (datetime because want part independent, , timestamp because want code work after year 2038) for reason, want store 64-bit unix timestamp in mysql bigint column. however, seems php timestamp functions homecoming 32-bit integers on 32-bit scheme (which running) how can 64-bit unix timestamp using 32-bit php? php mysql

java - Identifying repeating numbers in a array -

java - Identifying repeating numbers in a array - i dealing next problem. not looking provide me solution looking guidance solving problem. here have come far. i have tried first set ( around values repeat. getting out of bounds error. appreciate if can force me towards right path coding little algorithm handle problem. my code (in progress) import java.util.random; public class test { public static void main(string[] args) { int[] values = { 1, 2, 5, 5, 3, 1, 2, 4, 3, 2, 2, 2, 2, 3, 6, 5, 5, 6, 3, 1 }; boolean inrun = false; (int = 0; < values.length; i++) { if (values[i] == values[i + 1] && values[i + 1] < values.length) { system.out.print("("); } system.out.print(values[i]); } } } you need iterate array , if found pair iterate 1 time again in while loop until find non pair. sample: int[] values = { 1, 2, 5, 5

c# - Visual Studio Dynamic Compilation working for .aspx but not for .ascx -

c# - Visual Studio Dynamic Compilation working for .aspx but not for .ascx - after migrating website project facing unusual behaviour of visual studio dynamic compilation. whenever modify aspx file or master page , save it, modification visible instantly in debug browser, need refresh page. when create modification on ascx file , save it: no alter visible when refresh browser. modification visible if restart iis or recompile whole project. does have thought on whatever might causing dynamic compilation not work ascx when works fine aspx , master pages? c# asp.net visual-studio-2012 dynamic-compilation

c - Change socklen_t int to uint32_t in sys/socket.h -

c - Change socklen_t int to uint32_t in sys/socket.h - i have conflicting typedef socklen_t in library i'm trying build , included file ndk-path/platforms/android-19/arch-arm/usr/include/sys/socket.h. the library has typedef uint32_t socklen_t includes sys/socket.h typedefs int. create library utilize sys/socket.h version (int) or redefine in socket.h header (as below). safer? tried contacting author of library no response. changing definition in socket.h safe? #ifndef _sys_socket_h_ #define _sys_socket_h_ #include <sys/cdefs.h> #include <sys/types.h> #include <cstdint> #include <linux/socket.h> __begin_decls #define sock_stream 1 #define sock_dgram 2 #define sock_raw 3 #define sock_rdm 4 #define sock_seqpacket 5 #define sock_packet 10 #ifdef __i386__ # define __socketcall extern __attribute__((__cdecl__)) #else # define __socketcall extern #endif /* bionic: sec argument shutdown() */ enum { shut_rd =

jquery - sliding div horizontal using overflow:hidden -

jquery - sliding div horizontal using overflow:hidden - this can't harder think, have run dead end , need on track. new coding, , know can't hard figure out, current coding knowledge doing trial , error , going in circles. have come hear lastly resort, not want impact rating on here , banned, seek explain best can... simply: (website link: http://missionaryenterprises.com/home.html) content part of page made of 9 boxes in un-ordered list. need add together more boxes content, without disturbing size , of website, want add together 2 buttons on either side when clicked 9 more content boxes slide in , appear. understand need create div wide hold set of 9 content boxes, or many want. div needs have attribute overflow:hidden, that's know, going play around more, help much appreciated :) shalom :) you can utilize show , hide feature of jquery shown in api.jquery.com your html <button id="showr">show</button> <button id="hidr

c - Hash Table with linked list -

c - Hash Table with linked list - i have problem exercice school. i have implement hash table using construction : struct book { char * title; char * auhor; int price; struct book * next; } so have create function inittable() create hash table table of struct book of 1000 elements. function : struct book* inittable(){ struct book *tab = malloc(sizeof(struct book) * 1000); homecoming tab; } note function supposed homecoming first element of table. don't know if syntax correct. so questions : is right syntax ? how can navigate in table ? example, if want go cell 50 of table, how can do? then, if there's collision in hash table, have create linked list set elements in conflict. each cells of table construction , not pointer of structure, don't understand how can link elements. sorry asking much , help. a hash table meant entry in collection key in constant time. in terms of implementation typically consists of "hidden" ar

windows - Autoit replace string in multiple text files -

windows - Autoit replace string in multiple text files - i have code: $szfile = "text.txt" $sztext = fileread($szfile,filegetsize($szfile)) $sztext = stringreplace($sztext, "before", "after") filedelete($szfile) filewrite($szfile,$sztext) it works have loads of text files , configure script each time problem. 1 know how create every file in dir. have tried $szfile = "*.txt" doesn't work. thanks. filefindfirstfile supports wildcards. note function returns file handle used in fileopen call. windows string file text autoit

javascript - How to get base class of item in QML? -

javascript - How to get base class of item in QML? - is there way item class in qml ? know objectname , id etc. looks bit unusual , not comfortable. need: class="lang-js prettyprint-override"> combobox { id: combobox } textfield { id: textfield } function getvalue(item) { switch(item.???) { //what property can utilize here? case 'combobox': homecoming item.model.get(item.currentindex).value; case 'textfield': homecoming item.text; } } using objectname described in lots of articles on net might ambiguous , excessive, example: class="lang-js prettyprint-override"> combobox { id: combobox objectname: "combobox" } textfield { id: textfield objectname: "combobox" /// oops!! } function getvalue(item) { switch(item.objectname) { case 'combobox': homecoming item.model.get(item.currentindex).value;

php - SQL LIMIT VS Loop Limit -

php - SQL LIMIT VS Loop Limit - i browsing around stack overflow attempting find how limit sql query while loop , came across code. $count = 0; while ($count < 4 && $info = mysql_fetch_assoc($result)) { //stuff $count++; } q 1: difference between code , using sql limit clause? q 2: reason want utilize code, rather using limit ? with code, mysql server send results client, client ignores after 4th row. server has more work, , more bandwidth used between client , server. they might want utilize mysql_num_rows() find out how many total rows selected, though want display first 4. however, mysql provides way limit -- can set sql_calc_found_rows alternative in select clause, , utilize select found_rows() total number of rows. there's no reason, except don't know feature. php sql count while-loop limit

node.js - fail to install ZMQ -

node.js - fail to install ZMQ - i seek install zmq my enveronment's version is c:\windows\system32>npm version { http_parser: '1.0', node: '0.10.29', v8: '3.14.5.9', ares: '1.9.0-dev', uv: '0.10.27', zlib: '1.2.3', modules: '11', openssl: '1.0.1h', npm: '1.4.14' } i want install zmq so type "npm install zmq" c:\windows\system32>npm install zmq - > zmq@2.7.0 install c:\windows\system32\node_modules\zmq > node-gyp rebuild \ c:\windows\system32\node_modules\zmq>node "c:\program files\nodejs\node_modules\ npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild /msbuild : error msb1009: 프로젝트 파일이 없습니다. 스위치: build/binding.sln gyp err! build error gyp err! stack error: `c:\program files (x86)\msbuild\12.0\bin\msbuild.exe` fail ed exit code: 1 gyp err! stack @ childprocess.onexit (c:\program files\nodej

android - How to remove black line in 9 patch image? -

android - How to remove black line in 9 patch image? - when generate 9 patch image @ time image having black line: how remove black pixels? you have uploaded not *.9.png image .png image in 9 patch not black line patch... 9 patch mechanism horizontal line shows contain area , vertical line shows image stretch area. whenever utilize 9 patch images, line not appear in device.. in image. 1) left vertical line indicates stretch area. image vertically(height) stretch area 2) top horizontal line indicates stretch area. image horizonatally(width) stretch area. 3) bottom horizontal line indicates text contain area(width). 4) right vertical line indicates text contain area(text can occupy height only). android nine-patch

json - streaming multiple series to highcharts -

json - streaming multiple series to highcharts - i'm using websockets stream valid json highcharts.js. goal chart few lines simultaneously on same graph. json, control, contains info 4-16 series (called parsers) i'd overlay highcharts. illustration of json: [ { "y": 91, "x": 1403640998, "name": "parser1" }, { "y": 184, "x": 1403640998, "name": "parser2" }, { "y": 26, "x": 1403640998, "name": "parser3" } ] i can single line graph, combined single series. i'd dynamically adjust series based on number of parsers i'm monitoring. if json contains info 3 parsers, posted above, i'd see 3 lines automatically update every second. as can see, can 1 show. my html <script type="text/javascript"> $(function () { $('#

Not receiving Amazon SES Bounce Notifications -

Not receiving Amazon SES Bounce Notifications - i have configured postfix on server deliver @gmail.com mails amazon ses: gmail.com smtp:email-smtp.eu-west-1.amazonaws.com:25 * : also, configured in amazon ses console receive bounces , complains on mail service using amazon sns. problem don't receive bounce if send mail service non-existent gmail address. if sending mail service mail.google.com address dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com receive: delivery next recipient failed permanently: dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com but if sending php script same address, postfix says: e4e1a9f9ce: to=<dsadaerwer.lala-band-sucks.justin-is-a-beaver@gmail.com>, relay=email-smtp.eu-west-1.amazonaws.com[54.72.42.170]:25, delay=21, delays=0.02/0.04/11/10, dsn=2.0.0, status=sent (250 ok 00000146d86bcc13-9fa1ac16-b1cd-476e-8398-31f406d47961-000000) so amazon ses accepts mail service don't noti

javascript - How can I show only the row of a table that has the same value that was entered in a textbox with jquery -

javascript - How can I show only the row of a table that has the same value that was entered in a textbox with jquery - i have table of rank type id of rank , shows me column line has line code: $('button').click(function () { var info = $("textarea").val(); var rank = $("#rank").val(); if(rank == ""){ alert("digit rank number"); } else{ info = data.replace(/\s/, " #"); info = data.replace(/([0-9]\s)/g, "$1#"); var lines = data.split("#"), output = [], i; (i = 0; < lines.length; i++) output.push("<tr><td>" + lines[i].slice(0,-1).split(",").join("</td><td>") + "</td></tr>"); output = "<table>" + output.join("") + "</table>"; var valuefinal = $(output).find('tr').filter(function(){ homecoming $(this).children('td').eq(1).text() == ra

libgdx - Java Map with multiple primitive keys -

libgdx - Java Map with multiple primitive keys - i'm looking have map in java/libgdx can take multiple primitive values key. concrete case have multiple position (x,y,z) need object attached. at moment using (object)map list key, isn't there improve way? the short reply question no, because primitive types can't java map keys. longer reply question easily, create position class - static class position { int x; int y; int z; position(int x, int y, int z) { this.x = x; this.y = y; this.z = z; } public boolean equals(object b) { if (b instanceof position) { position other = (position) b; homecoming this.x == other.x && this.y == other.y && this.z == other.z; } homecoming false; } public int hashcode() { homecoming (integer.valueof(x).hashcode() ^ integer.valueof(y) .hashcode()) & integer.valueof(z).hashcode(); } } then map<position, object> map; jav

php - Laravel Setup: Can't install Monolog -

php - Laravel Setup: Can't install Monolog - i tried install fresh instance of laravel described in docs ( http://laravel.com/docs/quick#installation - "via composer"). got error composer: ... writing lock file generating autoload files php fatal error: class 'monolog\logger' not found in ...\src\vendor\laravel\framework\src\illuminate\log\logserviceprovider.php on line 23 {"error":{"type":"symfony\\component\\debug\\exception\\fatalerrorexception","message":"class 'monolog\\logger' not found","file":"...\\src\\vendor\\laravel\\framework\\src\\illuminate\\log\\logserviceprovider.php","line":23}}script php artisan clear-c ompiled handling post-install-cmd event returned error: php fatal error: class 'monolog\logger' not found in ...\src\illuminate\log\logserviceprovider.php on line 23 php fatal error: class 'monolog\logger' not found in ...\src\illumi

javascript - How to convert some td from a table into textbox when a button is clicked -

javascript - How to convert some td from a table into textbox when a button is clicked - i have table 4 rows , 4 column. have button called edit. when click on button, want lastly 2 columns of table changed textboxes values of columns , save button save them. i not have identification individual tds facing little problem in changing them textboxes. in html5 there feature called content editable. you can create 1 html element editable adding 1 attribute html element take illustration of td element, if want create editable, add together 1 "contenteditable" attribute td element <td contenteditable>some string</td> in jquery can add together contenteditable attribute this $("td#target").attr("contenteditable", ""); after making contenteditable have click on html element, appear editable html element. hope helpful. javascript jquery html

java - Importing maven web project in eclipse giving red, *, ? error in .project, .classpath -

java - Importing maven web project in eclipse giving red, *, ? error in .project, .classpath - i have created maven project next guidelines of website http://docs.cometd.org/tutorials/. it's working fine in cmd. now, have converted project eclipse web project using command: mvn eclipse:eclipse -dwtpversion=2.0 when importing project eclipse juno, it's giving error. in project facets have checked dynamic web module. still i'm getting error. delete .classpath , target folders(only src , pom whould there). without running mvn eclipse:eclipse import simple maven project. give seek should work java eclipse maven cometd

jquery - Knockout checked binding -

jquery - Knockout checked binding - so i'm trying utilize custom knockout checkbox binding trigger visibility on divs in form. i'm having hard time figuring out why won't work correctly. i've gotten point initial value gets set, won't reupdate. problem don't seem able bind checkbox correctly. i've got fiddle help create more sense. when loads sets right values, subsequent clicking doesn't anything. i'm stumped i've looked @ long. var info = true; ko.bindinghandlers.aipchecked = { update: function(element, valueaccessor) { var options = valueaccessor(); alert(options.value()); if (options.value()) { $(options.checked).slidedown('fast', function () { }); $(options.unchecked).slideup('fast', function () { }); } else { $(options.checked).slideup('fast', function () { }); $(options.unchecked

javascript - Render objects on top using renderDepth with Three.js -

javascript - Render objects on top using renderDepth with Three.js - i'm trying render objects on top of other objects. in fiddle, greenish torus knots render on top of reddish boxes , floor. i've been trying mesh.renderdepth = 0, 1, 1000 , changes nothing. the material has been created so: material = new three.meshbasicmaterial( { color: 0x00ff00, transparent: true, opacity: 0.5 } ); how can accomplish using renderdepth? missing other setting? using depthtest true works not acceptable because concave meshes (like torus) suffer overlapping polygons, when opaque. and while haven't managed this other solution 2 scenes running, strikes me having more overhead , perhaps less flexible using renderdepth fully working jsfiddle: http://jsfiddle.net/qhssj/ thanks help this post little old, stumbling upon this, sure objects custom renderdepth have material depthwrite set false: material.depthwrite = false here update posted fiddle: http

Mapreduce in R - how can i implement "loop if" in reduce? -

Mapreduce in R - how can i implement "loop if" in reduce? - this illustration dataset: x <- c("a1", "a1", "a1", "a2", "a2", "a2", "a2", "a3") y <- c(5347, 5347, 5347, 1819, 1758, 1212, 1212, 1456) i can't prepare dataset input mapreduce's query after "map|sort", because have separate \t , after (it's necessary step in mapreduce split rows): fields <- unlist(strsplit(line, "\t")) where line input 2 fields: fields[[1]] = all column x fields[[2]] = all column y i want result: id count unique number a1 1 (only 5347) a2 3 (1819, 1758, 1212) a3 1 (only 1456) how can count this, loop observe column x , y long search new number in column x , count unique number in column y unique number in column x?? the question not clear (maybe because of english language problem). expected result, think looking like: tapply(y,x,

c# - PDF Sharp, Image stretch across multiple page -

c# - PDF Sharp, Image stretch across multiple page - im trying allow users save/view gantt chart using pdf sharp, problem when user selects many rows image gets compressed , unreadable, there way can allow/set image stretch across multiple pages? so im creating 2 images combining them outputting pdf page, have tried setting page width higher didnt work. bitmap bitmap = new bitmap(image.width + imagetest.width, math.max(image.height, imagetest.height)); using (graphics combineg = graphics.fromimage(bitmap)) { combineg.drawimage(imagetest, 0, 0); combineg.drawimage(image, imagetest.width, 0); } //convert pdf pdfdocument document = new pdfdocument(); document.info.title = "holiday_year " + year + "&quarter " + quarter; pdfpage page = document.addpage(); page.orientation = pdfsharp.pageorientation.landscape; xgraphics gfx = xgraphics.frompdfpage(page);

java - OpenShift EGIT Eclipse -

java - OpenShift EGIT Eclipse - has out there gotten existing eclipse dynamic web project working under openshift? know tutorial ties 3 title elements together? i have openshift plug-in , egit plug-in added eclipse kepler. i've tried creating new openshift project in eclipse. until final step when errors wanting location ssh "pub" file. nil prior had mentioned , if knew or talking about, there's no place in of dialogs come in it. i've started number of git , openshift tutorials or guidelines. think using reddish hat linux. i'm using windows 8. it doesn't appear openshift allow select existing eclipse dynamic web project doesn't somehow magically exist in openshift. i've read solutions other user's problems supplied reddish hat , they're fragmentary , tend stipulate grade of knowledge questioner doesn't have. it's been confusing. want host dynamic web project on openshift because back upwards tomcat 7,

How to check if row already exists in log table from inside After Delete trigger in SQL Server 2008? -

How to check if row already exists in log table from inside After Delete trigger in SQL Server 2008? - i found similar question here not understand how implement in trigger. using sql server 2008. this trigger. alter trigger [dbo].[trg_deletedrecordlog] on [dbo].[projectrecords] delete insert dbo.deletedprojectrecords (recordid, batchid, imageid, parish, surname, militarynumber, nationality, dateofbirthandspecialnumber, firstname, barnorchild, dateofmarriage, spouseorguardiandateofbirth, occupation, birthplaceparish, birthplacecounty, earliercensus1, earliercensus1parish, earliercensus1county, earliercensus1place, earliercensus2, earliercensus2parish, earliercensus2county, earliercensus2place, guardianfirstnameinitials, postaladdresslivingplace, postaladdresscity, sailorhousenumber, numberonimage, entryuserid, entrydate, verifyuserid, verifydate, workstationid, imagefocusposition, projectid, imagetype, numberonimagefocus, surnamefocus, militarynumberfocus, nationalityf

asp.net - Export Radgrid contains Charts -

asp.net - Export Radgrid contains Charts - i'm trying export radgrid pdf (or excel). radgrid contains radhtmlgridcharts also. want export them radgrid in format (image, charts, or whatever) table text not charts. here aspx code: <telerik:radgrid id="radgrid5" runat="server" allowpaging="false" skin="default" onitemdatabound="radgrid5_itemdatabound" onneeddatasource="radgrid5_needdatasource" onitemcreated="radgrid5_itemcreated" onitemcommand="radgrid5_itemcommand"> code behind: protected void radgrid5_itemcreated(object sender, griditemeventargs e) { e.item.visible = true; } public void configureexport(radgrid sender) { sender.exportsettings.openinnewwindow = true; sender.exportsettings.filename = "exporteddata"; } protected void radbutton_click(object sender, eventargs e) { configureexport(radgrid5);

android - what is the value of Arg1 and Arg2 on onItemClick? -

android - what is the value of Arg1 and Arg2 on onItemClick? - i'm trying alter 1 textview in view in listview, and got 1 adapter set can't utilize adapters this. i tried in "for" statement, using mlistview.getchildat(i) but didn't worked. when tried within onitemclick method, using arg1 instead of mlistview.getchildat(i) , worked item clicked. but need happen without clicking on item, so question is: value of arg1 , arg2 ? i know represent, want know value when click on item. thanks. from android documentation : public abstract void onitemclick (adapterview<?> parent, view view, int position, long id) callback method invoked when item in adapterview has been clicked. implementers can phone call getitematposition(position) if need access info associated selected item. parameters : parent adapterview click happened. view view within adapterview clicked (this view provided adapter) position posit

database - Referring to int as string in mysql query -

database - Referring to int as string in mysql query - while working mysql database did queries made me astonished ! allow suppose little table id int , name varchar , when made update query based on id (using c#): mysqlcommand comm = new mysqlcommand("update database.table set name=@name id=@id", sqlconn); comm.parameters.addwithvalue("@name", textbox1.text); comm.parameters.addwithvalue("@id", textbox2.text); comm.executenonquery(); sqlconn.close(); and did work correct, isn't matter if id passed database int or string , going on please explain me ? mysql "do mean" sort of database , automatically convert types required. most of time thing, means don't have fuss casting, can lead ambiguity , odd errors when things without knowing, truncating info silently. mysql database

javascript - Is there any reference to the selected element in a delegated 'on' handler? -

javascript - Is there any reference to the selected element in a delegated 'on' handler? - when using jquery on , there way selected element within handler, opposed event target? example, none of next related body : $('body').on('click', 'h1', function(e){ console.log(e.target); console.log(e.currenttarget); console.log(this); }); the value of e.delegatetarget in event handler element handled event in illustration <body> tag. as looks know, e.target set object originated event (might kid object in <h1> ) , e.currenttarget , this set object matches "h1" selector. most of time, it's object matches <h1> selector want, can utilize e.delegatetarget if want know object intercepted event. jquery documentation reference: http://api.jquery.com/event.delegatetarget/ javascript jquery event-delegation

Getting Image's Uri in Windows Phone -

Getting Image's Uri in Windows Phone - i should image's uri when seek it giving error. image's urisource able casting bitmapimage bitmapimage's properties throwing errors. how can image's source? img0.source = getimageforindex(0, names, file, path).imgsource; imagelisttemplate getimageforindex(int index, list<string> names, isolatedstoragefile file, string path) { using (isolatedstoragefilestream stream = file.openfile(path + names[index], filemode.open, fileaccess.read)) { bitmapimage tempimage = new bitmapimage(); tempimage.setsource(stream); imagepath = path + names[index]; homecoming new imagelisttemplate() { imgsource = tempimage }; } } imgsource's type bitmapimage already. you're not setting uri source image, you're loading stream of info instead. the bitmapimage can populated stream or uri. can read urisource if set, creating image u