Posts

Showing posts from February, 2013

what is the equivalent in TFS of git cherry-pick -

i'm sorry question i'm tfs noob user, equivalent in tfs of git cherry-pick first, create patch changeset want cherry-pick: tf diff /version:c1234 /format:unified > cherry.patch (note: careful redirecting file powershell. wants write utf-16 files many programs have hard time coping with.) then apply patch using patch : patch -p0 < cherry.patch

javascript - Binding the Json response to Kendo grid -

Image
i bit confuse how bind response in kendo grid. getting response form service below i need show response in grid shown below i using angular js, mvc , kendo grids. which best modify response data in grid. in mvc or angular js. thanks advance if prefer letting grid's data source handle data grouping , aggregation use grid's data source. code below razor syntax, however, there direct equivalent in kendo ui js. datasource(datasource => datasource .server() .aggregates(aggregates => { aggregates.add(p => p.amount).sum(); }) .group(groups => groups.add(p => p.customername) )

ios - How to take Iphone 4 screenshots with Xcode 8 -

this so post gives image resolutions needed xcode images.xcassettes when doing launch image iphone. 1 of images needed 2x iphone 4. however, since upgrading xcode 8, target builds iphone 5 , above. how screenshot iphone 4? xcode -> preferences -> components install older version of simulator , iphone 4s appear in simulator list. 4 , 4s had identical screen resolutions. p.s. need set project deployment target older version installed

jquery - Query string in url with : -

$("#menu a").each(function(index) { if($.trim(this.href) == window.location.href) { $('div', this).addclass("cc"); } }); this work when go example.com/foo/foo/ when navigate second page example example.com/foo/foo/p:2 this not work. how make query. use .indexof function compare urls. $("#menu a").each(function(index) { var currenturl = window.location.href; var ahref = $.trim(this.href); if(currenturl.indexof(ahref) !== -1) { $('div', this).addclass("cc"); } });

python - how to iterate through a json that has multiple pages -

i have created program iterates through multi-page json object. def get_orgs(token,url): part1 = 'curl -i -k -x -h "content-type:application/json" -h "authorization:bearer ' final_url = part1 + token + '" ' + url pipe = subprocess.popen(final_url, shell=false,stdout=subprocess.pipe,stdin=subprocess.pipe) data = pipe.communicate()[0] line in data.split('\n'): print line try: row = json.loads(line) print ("next page url ",row['next']) except : pass return row my_data = get_orgs(u'mybeearertoken',"https://data.ratings.com/v1.0/org/576/portfolios/36/companies/") the json object below: [{results: [{"liquidity":"strong","earningsperformance":"average"}] ,"next":"https://data.ratings.com/v1.0/org/576/portfolios/36/companies/?page=2"}] i using 'next' ke

How to write dynamic SQL Queries in Entity Framework? -

i have page user can input sql query. query can against table in database. need execute query against corresponding table , show result in view. how this? for eg: user can input select * abc or select max(price) items . i tried: var results = dbcontext.database.sqlquery<string>(query).tolist(); but throws error: the data reader has more 1 field. multiple fields not valid edm primitive or enumeration types. whatever result should able pass view , display it. please help. you can use sqlquery<dynamic>" this resolve error able count of result returned. can verify query has returned data. still need know type of returned data. it risk of providing user input query database.

c - Border/Titlebar not properly displaying in SDL OSX -

Image
i following lazyfoo's sdl tutorial , ran sample code shown here: #include <sdl2/sdl.h> #include <stdio.h> //screen dimension constants const int screen_width = 640; const int screen_height = 480; int main( int argc, char* args[] ) { //the window we'll rendering sdl_window* window = null; //the surface contained window sdl_surface* screensurface = null; //initialize sdl if( sdl_init( sdl_init_video ) < 0 ) { printf( "failed initialise sdl! sdl_error: %s\n", sdl_geterror() ); } else { //create window window = sdl_createwindow( "sdl tutorial", sdl_windowpos_undefined, sdl_windowpos_undefined, screen_width, screen_height, sdl_window_shown ); if( window == null ) { printf( "failed create window! sdl_error: %s\n", sdl_geterror() ); } else { //get window surface screensurface = sdl_getwind

r - Replace element in vector based on first letter of character string -

consider vectors below: id <- c("a1","b1","c1","a12","b2","c2","av1") names <- c("alpha","bravo","charlie","avocado") i want replace first character of each element in vector id vector names based on first letter of vector names . want add _0 before each number between 0:9 . note elements av1 , avocado throw things off bit, lowercase v in av1 . the result should this: res <- c("alpha_01","bravo_01","charlie_01","alpha_12","bravo_02","charlie_02", "avocado_01") i know should done regex i've been trying 2 days , haven't got anywhere. we can use gsubfn . library(gsubfn) #remove number part 'id' (using `sub`) , unique elements nm1 <- unique(sub("\\d+", "", id)) #using gsubfn, replace non-numeric elements matching #key/value pair i

ibeacon - Swift2.3 code for Beacon detection -

we in advanced stages of developing swift2.2 app , hence have decided migrate 2.3 in interim , full swift 3 migration later. unable beacon detection working post conversion swift 2.3. method "didrangebeacons" keeps returning empty array. same code working in swift 2.2 know have permissions etc in place. also if open "locate" app on same ipad our app starts returning data in "didrangebeacons". have tried various versions of apps out there , swift2.3 apps behaving same way. can't make out locate app doing... on same boat?? here code using. not sure supposed written here or in comments couldn't put code within comments somehow... import uikit import corelocation class viewcontroller: uiviewcontroller, cllocationmanagerdelegate { let locationmanager = cllocationmanager() let region = clbeaconregion(proximityuuid: nsuuid(uuidstring: "9735bf2a-0bd1-4877-9a4e-103127349e1d")!, identifier: "testing") // note: make sure repl

404 - basic spring rest failing and showing 404 error -

trying spring rest application , getting 404, not able figure out problem, server console shows nothing problem, below code there many posts problem, checked them did modifications also, none worked body please give solution this.thank this controller @restcontroller @requestmapping("/service") public class springservicecontroller { @requestmapping(value = "/{name}", method = requestmethod.get) public string getgreeting(@pathvariable string name) { string result="hello "+name; system.out.println("in controller"); return result; } } web.xml <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>springrest</display-name> <welcome-file-list>

java - how to know if a jvm is in trouble -

Image
jvm facing out of memory problem. when occurs unable connect using jvisual vm also. jvm not responding request. kept jvisual window open, without warning or error on tool got disconnected. now, when monitor on jvisual vm(when jvm normal). see now, unable tell if jvm in real problem or not, until tool stops responding, sort of alert. oom not cause memory getting filled up. thread count increasing , oom(unable create new native thread error). how solved problem, future use, build or software provide feature

ruby change color of label if conditional -

i'am start learn code (and english .. ) , have prob ruby conditional . :o i have array, " category" depending "publication" post. and color of label category change in fonction catgeory ? ( sorry english work learn ^^ ) it's part of simple form for post product ( 's false it's show idea ) <%= f.input :category, collection:[" application ", "nature" ,"design", "science"], prompt: "choisissez votre categorie"%>** its part of index view product <% if category["nature"]? %> <span class="label label-info"> <h6><%= publication.category %></h6> </span> <% else if category["tech"]? %> <span class="label label-sucess"> <h6><%= publication.category %></h6> </span> <%end%> thx help an alternative above suggestion create helper method. def publication_la

c# - how to open file after read image bytes from the database -

i have used below code showing image in image picture box, add code opening file (pdf,image,...) after reading database int imageid = convert.toint32(imageidcombobox.text); // read image bytes database , display in picture box byte[] imagebytearray = productdb.readimage(imageid); memorystream ms = new memorystream(imagebytearray); imagepicturebox.image = system.drawing.image.fromstream(ms); ms.close(); i have tried used below code not recognize response. ms.writeto(response.outputstream) you need save file somewhere. suggest use gettemppath method obtain temp file name. after have saved file can open default program of machine using process class some pseudo code: string filename = "c:\temp\foo.pdf"; //or use path.gettemppath() ms.write(new streamwriter(filename)); //you may want use using statement file stream ensure file closed process.start(filename); https://msdn.micro

android - :app:transformClassesAndResourcesWithProguardForRelease takes too long -

i have problem building release app proguard enabled. building stuck executing task :app:transformclassesandresourceswithproguardforrelease takes more 40 minutes! dependencies { compile filetree(include: ['*.jar'], dir: 'libs') testcompile 'junit:junit:4.12' compile('com.github.afollestad.material-dialogs:core:0.8.5.5@aar') { transitive = true } apt 'com.jakewharton:butterknife-compiler:8.0.1' compile 'com.android.support:appcompat-v7:24.2.0' compile 'com.android.support:design:24.2.0' compile 'com.android.support:support-v4:24.2.0' compile 'com.android.support:percent:24.2.0' compile 'com.android.support:recyclerview-v7:24.2.0' compile 'com.android.support:cardview-v7:24.2.0' compile 'com.google.android.gms:play-services-appindexing:9.4.0' compile 'com.google.android.gms:play-services-analytics:9.4.0' compile '

php - Class app\models\user not found yii2 -

i did user authentication on yii2 , in local works find after when pulled server i'm getting error class 'app\models\user' not found , marked area i'm getting $identity = $class::findidentity($id); , knows problem? when storing class name in variable, use full namespace leading slash: $class = '\app\models\user'; $identity = $class::findidentity($id); also make sure class name , namespace exists. and class name should start capital letter - user , not user . helps avoid possible problems letter case on different os.

xml - Warning in first Spring project -

i`m beginner in spring. easy example "hello world", have warning. my pom.xml: <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.pavlo.firstspring</groupid> <artifactid>mavenspringdevcolibrifirst</artifactid> <version>1.0-snapshot</version> <dependencies> <dependency> <groupid>org.springframework</groupid> <artifactid>spring-context-support</artifactid> <version>4.3.3.release</version> </dependency> <dependency> <groupid>org.springframework<

javascript - Highcharts - line between two categories -

i have chart of type column range , requirement have line connecting 2 categories. jsfiddle $(function() { $('#container').highcharts({ chart: { type: 'columnrange', inverted: true }, title: { text: 'test' }, subtitle: { text: 'sample' }, xaxis: { categories: ['jan', 'feb', 'mar'], visible: false }, yaxis: { visible: false }, legend: { enabled: false }, series: [{ name: 'series1', data: [ [0, 3], [0, 3], [0, 3] ], pointplacement: -0.20, pointwidth: 50 }, { name: 'series2', data: [ [3, 6], [3, 6], [3, 6] ], pointplacement: 0, pointwidth: 1 }, { name: 'series3', data: [ [6, 9], [6, 9], [6, 9] ], pointplacement: 0.20, pointwidth: 50 }] });}); how draw line 1 category another? there property available? you should able achieve similar chart adding new line series chart: { name: 'series4',

python - Foreign key which related to other foreign key choice -

i'm trying make following models in django: class client(models.model): client = models.charfield(max_length=200) loyal = models.booleanfield(default=false) class contact(models.model): first_name = models.charfield(max_length=200) last_name = models.charfield(max_length=200) client_id = models.foreignkey(client, on_delete=models.set_null,null=true) class activity(models.model): title = models.charfield(max_length=30) text = models.charfield(max_length=1000) client_id = models.foreignkey(client, on_delete=models.protect) contact_id = models.foreignkey(contact, on_delete=models.protect,limit_choices_to={'id__in': client_id.contact_set.all().values('id').query}) what want achieve - when creating activity , choose client in - want in contact field have choose contacts related choosen client, because when do: contact_id = models.foreignkey(contact, on_delete=models.protect) django allow me choose contacts. want limit som

image - Does Picasso library (Android version) save photos after app is closed or device is rebooted? -

using picasso library load images in android app. picasso save images reload them in app after app gets closed or device gets rebooted? the last version used did not. should cached when downloaded , attached view using. ie imageview. check documentation http://square.github.io/picasso/

Regex for email address without characters validation -

Image
i need regex check (if email a@b.cc : email must have @ , . (must have both). refer whole string must contain @ , @ least 1 dot. 1st word of email must have 1+ char the domain name between @ , . must 1+ char tld must 2+ char i made regex .+@.+\. it's not one, know. bad in regex use rarely. can me? it's not clear if matching email in middle of paragraph of text, or matching extracted string. assuming latter, , anchoring match start , end of line... /^.+@.+\.[^.]{2,}$/ p.s. using regex validate emails complex: http://www.regular-expressions.info/email.html

c++ - RtAudio - Playing samples from wav file -

Image
i trying learn audio programming. goal open wav file, extract , play samples rtaudio. i made waveloader class let's me extract samples , meta data. used this guide , checked correct 010 editor. here snapshot of 010 editor showing structure , data. and how store raw samples inside waveloader class: data = new short[wave_data.payloadsize]; // - allocates memory size of chunk size if (!fread(data, 1, wave_data.payloadsize, sound_file)) { throw ("could not read wav data"); } if print out each sample : 1, -3, 4, -5 ... seems ok. the problem not sure how can play them. i've done: /* * using portaudio play samples */ bool player::play() { showdevices(); rt.showwarnings(true); rtaudio::streamparameters oparameters; //, iparameters; oparameters.deviceid = rt.getdefaultoutputdevice(); oparameters.firstchannel = 0; oparameters.nchannels = maudio.channels; //iparameters.deviceid = rt.

c++ - cin infinite loop when reading in a non-numeric value -

i had strange behavior in program , spent long time trying deduce why. infinite loop no sense. testing these lines of code(under suspicion) got same result. every time type in non-numeric value such symbol, program runs through infinite loop printing zeros, guess how cout represents wrong value entered. i'd know why weird behavior cin, printing zeros instead of stopping when finds wrong reading. #include <iostream> using namespace std; int main() { int n = 0; while(n >= 0) { cin >> n; cout << n << endl; } return 0; } the program runs through infinite loop printing zeros, guess how cout represents wrong value entered. that not quite right: when ask cin int , there's no int , no value back, invalid input remains in buffer. when ask int again in next iteration of loop, same thing happens again, , no progress made: bad data remains in buffer. that's why infinite loop. fix this, need add c

html - XSLT Conversion - INNERHTML -

i posted question yesterday great success, did not give me needed more enough put me on right path. ran difficulty , hoping find similar guidance. i have document several different types of elements, can nested within others. need remove tags , leave inner html whenever element present. for example, if element pnum present, need take whole element , remove inner elements, leaving behind inner html. input: <li> <pnum> blah blah <linum>hello hello</linum> bye <title>good morning</title> </pnum> </li> output: <li> blah blah hello hello bye morning <li> i able using htmlagilitypack, had traverse every node , performance not great. wondering if there quicker xslt transform can perform on doc. thanks in advance! i not sure have taken term innerhtml since ie 4 includes markup request strip markup not seem related innerhtml. as xslt, can use <xsl:template ma

mysql - How to fix this message ?Severity: Notice --> Undefined property: stdClass:: -

enter image description here i trying display table mysql db using codeigniter , angularjs doing wrong? view: list_show_data.php <?php defined('basepath') or exit('no direct script access allowed'); ?><!doctype html> <html ng-app="app"> <head> <meta charset="utf-8"> <title>list show data</title> <link rel="stylesheet" src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> </head> <body> <div ng-controller="decontroller"> <table class="table table-bordered table-striped table-hover"> <thead> <tr> <th>first name</th> <th>last name</th> <th>email</th> <th>role</th> <th>privileges</th> <th>user name</th> </tr> </thead> <tbody> <tr ng-repeat="n in list_data"> <td>{{n.first name}}</td>

javascript - Test whether all reducers have been imported in the rootReducer -

i have rootreducer imports separate reducers so: import { combinereducers } 'redux'; import departments './departments'; import indicators './indicators'; import versions './versions'; import projects './projects'; // combine reducers single reducer, state linked reducer via key used here const rootreducer = combinereducers({ versions, departments, indicators, projects, }); export default rootreducer; since it's important reducer import everything, think makes sense test whether defined reducers in ./src/reducers imported. method can think of use fs check number of files in ./src/reducers (without index , or rootreducer ) , check whether rootreducer contains many reducers. seems ugly test, , bit fragile well. still nice notified failing test when forget include reducer. best way test whether reducers have been imported? i hear you're coming don't think want dealing issue in tests. application grows you

user interface - Espresso: Clicking on Recycler view with unknown position -

Image
i have have list if recycler views in different positions in screen. below i want click on specific recycler view based on variable text 'job#' inside it. but cannot perform same not know exact position should click. the position of recycler view keeps changing. tried below code clicks on static position '6' recyclerview = onview( allof(withid(r.id.recycler_view), isdisplayed())); recyclerview.perform(actiononitematposition(6, click())); i want know proper position dynamically. clicking position in instrumentation tests, in opinion, bad practice leads non-deterministic tests. applicable both recyclerview , adapterview . so in order not rely on position need itemview matcher recyclerview action. itemview matcher view matcher matches itemview of viewholder . in case need match linearlayout holds highlighted relativelayout , can represented hasdescendant(withtext("job 109")) the end solution in case should like:

sql server - In SQL, exporting the table as text with formats and rules -

i novice in sql world; i've been searching site couple of hours , not find answer. i'm using sql server management studio arrange table of customers columns: name, address1, address2, address3, city, state, zipcode, item_purchased, quantity_purchased, etc... however i've been trying format table texts in such way: john smith 123 sql street los angeles, ca 90001 item_purchased - quantity_purchased would possible achieve in sql? if not, interested know way around in java or python input/output method. brad, try this: select name + char(13) + case when ltrim(rtrim(isnull([address1],''))) <> '' ltrim(rtrim(isnull([address1],''))) + char(13) else '' end + case when ltrim(rtrim(isnull([address2],''))) <> '' ltrim(rtrim(isnull([address2],''))) + char(13) else '' end + case when ltrim(rtrim(isnull([address3],''))) <> '' ltrim(rtrim(isnull([ad

xml - character entity converting to character when I want it left as an entity in Arbortext -

i have original xml code includes entity <technumber>1&amp;p</technumber> when opened in arbortext 1&p instead. when want left entity. there setting can use keep conversion happening? arbortext has advanced preference "entityinputconvert" turn off.

ruby - OSX with RVM "cannot load such file -- bridgesupportparser (LoadError)" -

i hit problem running rake on rubymotion project, feels it's more general rvm-on-mac issue. i'm running rvm 2.3.1 on osx 10.11.6 if fire irb , try require 'bridgesupportparser' error cannot load such file -- bridgesupportparser (loaderror) i can find .rb file @ /system/library/bridgesupport/ruby-2.0/bridgesupportparser.rb and if require '/system/library/bridgesupport/ruby-2.0/bridgesupportparser'', i new error, 'cannot load such file -- bridgesupportparser.so' it looks need bridgesupportparser.so , bridgesupportparser.rb somewhere ruby can find them. i have several bridgesupportparser.rb files on machine, no bridgesupportparser.so. there bridgesupportparser.bundle files, though - looks may mac version of .so files. as first ran rubymotion, did following: new install of xcode (8.0) deleted , reinstalled rubymotion (4.13) tried (suggested here ): mv /library/rubymotion/lib/bridgesupport mv /libra

javascript - Is it possible to change the localStorage file name where i saved data? -

i appreciate if me out this, basically, creating google chrome extension objective of saving data forms in localstorage folder, far, good, it's working fine , stuff, question is, possible change name of file save data? let's creating new account in google, , want save data entered far, click in extension icon, save data , in localstorage, file name data stored "https_accounts.google.com_0.localstorage", possible change in js code appends (for example date , time when especific data saved) file name, making "22-9-16_16:40_https_accounts.google.com_0.localstorage"? thank reading , appreciate if me out, sorry if messed while writing or if have solution right in front of eyes, don't know if it's possible, and, if is, how it. again, thank much, have day. no. how browser records data localstorage implementation detail. not exposed javascript in webpage @ all.

javascript - Reuse data from API | React -

i'm trying send data api component in react, how should i? tried "props", i'm still newbie , not how pass data components, can see in code in "user.jsx" in <h2> john doe </ h2> want print data comes api "usuario", advice please api.jsx import react 'react' import menuprofile './user.jsx' export default class cliente extends react.component { constructor() { super() this.state = { clientid: '', usuario: '' } } componentwillmount() { fetch('myurl', { method: 'post', body: json.stringify({ usuario: 'test', password: 'test', }) }) .then((response) => { return response.json() }) .then((data) => { this.setstate({ clientid: data.clientid, usuario: data.usuario }) }) } render () { return ( // testing if state pri

angularjs - Can not install angular-cli on mac Elcapitan -

when try install angular-cli see many warnings , after when type ng --version shows : mdsazids-imac:~ mymac$ ng --version fs.js:640 return binding.open(pathmodule._makelong(path), stringtoflags(flags), mode); ^ typeerror: path must string or buffer at typeerror (native) @ object.fs.opensync (fs.js:640:18) @ object.fs.readfilesync (fs.js:508:33) @ function.version.fromproject (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:87:31) @ function.version.isprewebpack (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:111:31) @ function.version.assertpostwebpackversion (/usr/local/lib/node_modules/angular-cli/upgrade/version.js:97:18) @ /usr/local/lib/node_modules/angular-cli/bin/ng:25:15 @ /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:44:21 @ ondir (/usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:187:31) @ /usr/local/lib/node_modules/angular-cli/node_modules/resolve/lib/async.js:153:39

java - Libgdx Android: method onStart() not called after onCreate() -

onstart() i know onstart() method called after oncreate() ( via activity lifecycle documentation ), in libgdx project doesn't happen. i' ve code: @override protected void onstart() { super.onstart(); gdx.app.debug(tag, "onstart"); } but string in debug terminal appears if resume app background. need stuff after initialise of activity, when becomes visible. edit: more code public class androidlauncher extends androidapplication { private final static string tag = androidlauncher.class.getsimplename(); googleresolver googleresolver; googlesigninaccount acct; private preferences googleprefs; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); googleresolver = new googleresolverandroid(); androidapplicationconfiguration config = new androidapplicationconfiguration(); config.useimmersivemode = true; config.usegyroscope = false; config.usecompass = false; config.useaccelero

how can i do to give background color to the headers using alasql? -

what right key word give header bgcolor ? window.exportexcel = function exportexcel(listpersone) { var filename=prompt(); var opts = { headers:true, style:'background:#00ff00', //doesn't work column: {style:{font:{bold:"1"}}}, rows: {1:{style:{font:{color:"#ff0077"}}}}, cells: {1:{1:{ style: {font:{color:"#00ffff"}} }}} }; alasql('select * xlsxml("'+filename+'.xls",?) ?',[opts,listpersone ]); } example this solution give header background color ! var opts = { headers:true, column: { style:{ font:{ bold:"1", color:"#3c3741", },

visual studio - How to "Exclude from Project" in VS2015 from Package Manager Console(i.e. Script) -

Image
i can right click file , "exclude project" in package manager console or script, can delete file. <- file shows missing opposed having been excluded project. is solution manually edit project file , reload project?

php - Error: Failed to open stream: No such file or directory -

i have code , same twilio.php library running on both local (xampp) server , vps: checkconnection.php <?php // include twilio php library here require '/twilio-php/twilio/autoload.php'; use twilio\rest\client; $sid = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // account sid www.twilio.com/console $token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; // auth token www.twilio.com/console $client = new twilio\rest\client($sid, $token); $message = $client->messages->create( 'xxxxxxxxxxxxx', // text number array( 'from' => 'xxxxxxxxxxxxx', // valid twilio number 'body' => 'mysql down!' ) ); print $message->sid; ?> the code runs locally, vps outputs following errors: php warning: require(/twilio-php/twilio/autoload.php): failed open stream: no such file or directory in /var/www/html/thsportsmassagetherapy.com/mysql-monitor/checkcon

makefile - Performing an action over each source file with make -

i have created makefile this cc = sdcc srcs = $(pname).c\ ../../src/gpio.c ../../src/timers.c ../../src/i2c.c $hdrs = -i../../headers all: mkdir -p ./output $(cc) $(srcs) -lstm8 -mstm8 $(hdrs) the problem is, sdcc can compile 1 source @ time. need perform foreach on each source have defined in srcs variable. how in gnu-make? according the docs , must compile files other 1 containing main() separately, produce .rel files, include in compilation command main file. there several variations on how that. following avoids features specific gnu make: # we're assuming posix conformance .posix: cc = sdcc # in case ever want different name main source file mainsrc = $(pmain).c # these sources must compiled .rel files: extrasrcs = \ ../../src/gpio.c \ ../../src/timers.c \ ../../src/i2c.c # list of .rel files can derived list of source files rels = $(extrasrcs:.c=.rel) includes = -i../../headers cflags = -mstm8 libs = -l

javascript - Flip Card with Greensock Tween and Safari -

i've found pen: http://codepen.io/rhernando/pen/vjgxh html <div id="mainwrap"> <div class="cardcont"> <div class="cardback"></div> <div class="cardfront"></div> </div> <div class="cardcont"> <div class="cardback"></div> <div class="cardfront"></div> </div> <div class="cardcont"> <div class="cardback"></div> <div class="cardfront"></div> </div> </div> <div style="clear:both;"></div> <div id="mainwrap" style="margin-top:10px;"> <div class="cardcont"> <div class="cardback playcardback"></div> <div class="cardfront playcardfront"></div> </div> <div class="cardcont"> <div class="cardback playcardback"&

Xamarin Visual Studio - Unsupported major.minor version 52.0 -

i attempting run hello world example following tutorial: https://mva.microsoft.com/en-us/training-courses/xamarin-for-absolute-beginners-16182 i receiving following error: severityjava.lang.unsupportedclassversionerror: com/android/dx/command/main : unsupported major.minor version 52.0 helloxamarin.droid i have tried many combinations of jre/jdk versions. uninstalled them, reinstalled them. have tried jdk 7 , jdk 8. keep getting same exact no matter combination. you can follow blog resolve https://agilehobo.wordpress.com/2016/08/24/2-ways-to-resolve-unsupported-major-minor-version-52-0-when-building-xamarin-android-app/

assembly - What comes after QWORD? -

if 8 bits byte two bytes word four bytes dword 8 bytes qword what name 16 bytes? tl:dr : in nasm, after resb/resw/resd/resq there's reso, resy, , resz . in instruction mnemonics , intel terminology (used in manuals), o (oct) , dq (double-quad) both used. dqword isn't used, oword. disassemblers use xmmword ptr [rsi] memory operand explicit sizes in masm or .intel_syntax gnu syntax. iirc, there no instructions size isn't implied mnemonic and/or register. note question x86-specific, , intel's terminology. in other isas (like arm or mips), "word" 32 bits, x86 terminology originated 8086. terminology in instruction mnemonics octword used in mnemonics x86-64 instructions. e.g. cqo sign-extends rax rdx:rax. cmpxchg16b non-vector instruction operates on 16 bytes, intel doesn't use "oct" anywhere in description. instead, describe memory location m128 . manual entry doesn't use "word"-based sizes.

java - How do I say that an object is present in a Set that also has a treeset? -

i have s set of object a . class { string text1; string text2 treeset<classaa> classaaset; @override public boolean equals(object b){ } @override public int hashcode(){ } } the other class: class aa { string y; string z; @override public int hashcode() { return objects.hash(y,z) } @override public int compareto(classaa other) { return y.compareto(other.y) } } i have set of a's , single object a . how set<a>aset.contains(a) ? internally, since have treeset, ignoring equals implementation. it clearer if posted code correct extent compiled. anyway: your class aa should fulfil 3 requirements: (1) equal objects should return same hashcode() , (2) compareto() should consistent equals() , , (3) compareto() , treeset work correctly, class should implement comparable<aa> . i hope can add implements clause (3) on own. (2), @ documentation of comparable

angularjs - How to test controller separately? -

i have controller changing dom different places. the controller is: angular.module('mymodule').controller('mycontroller', mycontroller); function mycontroller() { this.addsomeclass = function() { $('#idofsomeelement').addclass('someclass'); }; } and used this. inside different components , html. <div id="idofsomeelement"></div> . . . <some-angular-component-here> <div ng-controller="mycontroller ctrl"> <div ng-click="ctrl.addsomeclass()"></div> </div> </some-angular-component-here> . . . <using-in-onother-place> <div ng-controller="mycontroller ctrl"> <div ng-click="ctrl.addsomeclass()"></div> </div> </using-in-onother-place> i try test this, have undefined ctrl. describe('controller test', function () { 'use strict'; var ctrl,

git - How to setup Github SSH login when host username and Github account are different? -

i have following "fake" configuration: a server: server1 a username in server1: user1 a private github repository: repo1 a github account: user2 i have created ssh key user1 on server1 running: ssh-keygen i have added id_rsa.pub key github account: user2 . i have tested ssh connection server1 logged in user1 github running following commands: ssh -t git@github.com ssh -t -p 443 git@ssh.github.com both command successful meaning can connect. try run: git pull being asked username , password , why? i trying avoid enter username/password each time need perform pull/commit/push. the repository configured https : remote.origin.url=https://github.com/company/repo.git should change remote url https ssh ? missing? note: "fake" not use real names configuration exists. you need use remote url ssh ensure ssh key used: git@github.com:company/repo.git . the easiest way probably: git remote remove origin git remote add origin

How to let python function pass more variables than what's accepted in the definition? -

i have generic function call looks like result = getattr(class_name, func_name)(result) this function call updates result . function call generic such can invoke many functions different classes. currently, these functions take 1 argument result . however, doesn't scale cases functions need pass more result more arguments (say, args ). is there way in python (2.7) allows generic function call pass args still invoke functions don't have arguments? if not, better approach solve problem? edit: cannot change existing function definitions, including take argument result . can change line: result = getattr(class_name, func_name)(result) you can add * within function call. pass result multiple arguments. lets have 2 functions: class yourclass: def my_first_def(one_arg): return (1, 2) def my_second_def(one_arg, second_arg): return (1, 2, 3) if not instanceof(result, tuple): result = (result,) result = getattr(yourclass, 'my_first

html - How do i make Bootstrap columns responsive on all devices? -

i'm developing login/register page need columns. page looks on desktop 1920x180: http://prntscr.com/cl4ms8 i using <div class="col-xs-6"> on both of forms evenly split on page. how go across making responsive on devices looks on iphone 6: http://prntscr.com/cl4ndb you elements col-xx-n classes need children or descendants of element class container-fluid . so, responsive: <div class="container-fluid"> <div class="col-md-4">this div takes 1/3 of available width on desktop</div> <div class="col-md-8">this div takes 2/3 of available width on desktop</div> </div>

c# - EntityFramwork 6 - ID not set when calling SaveChanges() -

i got little problem entityframework. setup follows : using code-first migrations , database structure : using microsoft.azure.mobile.server; namespace myproject.dataobjects { public class listrelations : entitydata { public string userid { get; set; } public bool read { get; set; } public bool write { get; set; } } } now inherting enititydata should add id field , meta data stuff, right ? when try populate database : var relations = new listrelations(); relations.userid = currentuser; relations.read = true; relations.write = true; relations.listid = current.id; context.listrelationsset.add(relations); try { context.savechanges(); } catch (dbentityvalidationexception dbex) { foreach (var validationerrors in dbex.entityvalidationerrors) { foreach (var val

Selenium ChromeDriver (C#) Crashes Only in Visual Studio Debug Mode -

Image
i facing issue running selenium tests written in c# in visual studio. the issue have when run tests on chromedriver studio in debug mode, chrome window crashes frowny face. the chromedriver command window shows following error in loop (~20 times). starting chromedriver 2.24.417431 (9aea000394714d2fbb20850021f6204f2256b9cf) on port 52376 local connections allowed. [28356:19528:0922/134628:error:child_process_launcher.cc(528)] failed launch child process this trace get: at openqa.selenium.remote.httpcommandexecutor.createresponse(webrequest request) @ openqa.selenium.remote.httpcommandexecutor.execute(command commandtoexecute) @ openqa.selenium.remote.driverservicecommandexecutor.execute(command commandtoexecute) @ openqa.selenium.remote.remotewebdriver.execute(string drivercommandtoexecute, dictionary`2 parameters) @ openqa.selenium.remote.remotewebdriver.startsession(icapabilities desiredcapabilities) @ openqa.selenium.remote.remotewebdriver..ctor(icommandexecutor

tfs2015 - TFS Build 2015 - Build procedure using Visual Studio 2015 -

i working on auto deployment using tfs 2015 new build functionality mvc application. solution has web service projects well, along other projects. first step, trying create build , identified need create paramters.xml file have configuration variables configured in file. believe, subsequently using parameter.xml need create setparameters_...xml file. my question are: 1) seems have manually create parameter.xml file. assumption correct? 2) how create setparameter...xml file? please guide me through process or resource can use reference. according description of parameter.xml , setparameters.xml . seems want create web deploy package in tfs2015 vnext build. you can directly use below msbuild arguments: /p:outdir=$(build.stagingdirectory) /p:deployonbuild=true /p:webpublishmethod=package /p:packageassinglefile=true /p:skipinvalidconfigurations=true for sample can take @ below blogs: building websites in team foundation build 2015 build , deploy azure web

Flatten contingency table in R -

this question has answer here: how sum variable group? 9 answers i have contingency table, eg built in titanic dataset, , want way drop variable , merge values together. sort of project data down onto lower dimensional space. e.g. looking @ 1 2-d slice of table sex class male female 1st 57 140 2nd 14 80 3rd 75 76 crew 192 20 if drop sex variable, want end 1-d contingency table looked like: class freq 1st 197 2nd 94 3rd 151 crew 212 my actual use case n dimensional table want able construct n 1-way , n*(n-1)/2 2-way tables from. feels there should simple way work. edit: note not duplicate of question has been linked with, referring data tables , not contingency tables . solution here convert contingency table data table , use xtabs contingency table . referenced solution deals case of starting data

android - Java HttpsURLConnection response JSON array -

i have been receiving json objects response httpsurlconnection. have been using parse response. objectmapper map = new objectmapper(); jsonnode node = map.readtree(conn.getinputstream()); this has been working fine me receiving arrays. how can parse them? this example of response receive: "value": [1 ] 0: { "id": "2135125324" "name": "john" "2ndname": null "lastname": "james" } please try if using asynctask write below code private void yourfunction() { class yourclass extends asynctask<string, void, string> { @override protected void onpreexecute() { super.onpreexecute(); } @override protected void onpostexecute(string s) { super.onpostexecute(s); try { jsonobject jsonobj = new jsonobject(s); user = jsonobj.getjsonarray("value"); js

angularjs - Angular app running auth via adal.js won't load template partials unless user logged in -

i'm using adal-angular.js part of auth chain. everything works pages require auth. pages not require auth load, won't load partials included in view. for example, index.html page has this: <ng-include src="'/module/utility/view/footer.html'"></ng-include> the footer appears if user logged in. i suspect problem similar this bug report, i'm not quite getting there. i tried adding anonymousendpoints adal init, so: adalauthenticationserviceprovider.init( { tenant: "xxx", // optional default, sends common clientid: "xxx", // required anonymousendpoints: ['/app/module/utility/view/footer.html'] // tried: //anonymousendpoints: ['/app/module/utility/view/'] //anonymousendpoints: ['/'] //and soforth. }, $httpprovider ); still no footer. also, no errors. any help? okay, answer pretty simple. what little doc