Posts

Showing posts from June, 2011

amazon s3 - Predetermining number of partitions of RDD -

1)how pre-determine number of rdd partitions created? 2)what factors partitioning of data depend on? size of data , way stored(compressed, sequence etc..) for simplicity, assume have 6gb file in hdfs stored plain text file. my cluster ec2 cluster below config, 1 master node - m3.xlarge(4 cores, 15gb ram) 4 core nodes - m3.xlarge(4 cores , 15gb ram each) update: happens if same stored in s3, hbase or nosql? the partitions dependent on file type. in case, since hdfs file, default number of partitions number of input splits , depend on hadoop setup. if want way of understanding how works. from hadooprdd.getpartitions : val inputsplits = inputformat.getsplits(jobconf, minpartitions) val array = new array[partition](inputsplits.size)

sql - Mysql complex issue on a single table -

i have question suppose there 2 tables customer cid name customerimage imgid cid here cid foreign key i know if want see images of customer write select customer.cid, customer.name , customerimage.imgid customer innerjoin customerimage customer.cid= customerimage.cid this shows list every image customer id , name what should add in if want show images of 1 cid in 1 column cid image name so image column should contain imgid customer i think want group images in 1 row each customer, can group_by clause , group_concat function in mysql: select c.cid , с.name , group_concat(ci.imgid separator ',') customer c join customerimage ci on c.cid = ci.cid group c.cid , c.name

c# - Centralizing actions of a program -

i have program needs perform actions various forms. want keep actions in centralized space. each action has own class derived interface. each action instantiated once, used on various places, contextmenu, ribbon, toolbar , on. i have following code working, , want rid of typeof in when making list. want have strong typing, no reflection , possibility refactor. can done more efficient? class program { static void main(string[] args) { actionmanager actionmanager = new actionmanager(); list<someinterface> lista = actionmanager.createlist(typeof(do_a), typeof(do_b)); list<someinterface> listb = actionmanager.createlist(typeof(do_a), typeof(do_b)); } } public class actionmanager { private dictionary<type, someinterface> instantiatedactions = new dictionary<type, someinterface>(); public list<someinterface> createlist(params type[] actions) { ...

Is there a way to save offline google map on hybrid mobile app on ionic? -

i planning develop hybrid mobile app using ionic. 1 of features need offline google map. there way how it? it depends on requirements of application whether possible. users on "modern" devices a.k.a html5 supported? users need view/edit map globally, or in specific area? map need provided google? i'll address issues below point in possible takes on problem. do need google maps? (most optimal scenerio) first of, need google maps? relevant: how far users need zoom maps? if can maps, , zooming not of high priority (if is, including map tiles make app eat storage) , use map-tiles packaged part of app, , display them library http://leafletjs.com/ . library documented, , provides map-interface variety of map-providers. do-able configure use own local map-tiles. include map-tiles multiple zoom levels if necessary, , limit min/max zoom-levels tiles have available. make maps work offline. i can't or don't wan't provide own tiles make sure looked op...

html - html5 input date attribute selecting between two dates -

Image
i using html5 date attribute, so: <form> birthday: <input type="date" name="bday"> </form> it works great in allows select date on calendar. however, capable of selecting date ranges jquery plugin does? i dont think can strictly using html5 only. need use javascript achieve trying do. you can refer date range picker twitter bootstrap

php - How to work with more than one pivot tables in Laravel? -

i have 4 tables. orders - pk(order_od) order_collections - pk(order_collection_id) , fk(order_id) order_collection_products - pk(order_collection_product_id) , fk(order_collection_id) product - pk(product_id) laravel documentation explains how data using 1 pivot table. how can data product table related specifyc order? how can use 2 pivot tables?

version control - Can git do a diff between a repo file and an external (non-repo) file? -

i need diff between version of myfile in master~2 , , copy of myfile exists outside repository (say d:\folder\myfile ). the wording in git-diff under --no-index says: git diff --no-index [--options] [--] […] this form compare given 2 paths on filesystem. can omit --no-index option when running command in working tree controlled git , at least 1 of paths points outside working tree the wording "at least one" seems imply comparison can done between 1 repo file , 1 non-repo file, in practice: $ git diff master~2:myfile d:/folder/myfile error: not access: 'master~2:myfile' $ git diff master~2:myfile -- d:/folder/myfile fatal: d:/folder/myfile: 'd:/folder/myfile' outside repository $ git diff --no-index master~2:myfile -- d:/folder/myfile usage: git diff --no-index <path> <path> what easiest way achieve comparison? without using git-diff , found indirect way of achieving - method given in this blog po...

scope - Local variables in Python nested functions -

okay, bear me on this, know it's going horribly convoluted, please me understand what's happening. from functools import partial class cage(object): def __init__(self, animal): self.animal = animal def gotimes(do_the_petting): do_the_petting() def get_petters(): animal in ['cow', 'dog', 'cat']: cage = cage(animal) def pet_function(): print "mary pets " + cage.animal + "." yield (animal, partial(gotimes, pet_function)) funs = list(get_petters()) name, f in funs: print name + ":", f() gives: cow: mary pets cat. dog: mary pets cat. cat: mary pets cat. so basically, why not getting 3 different animals? isn't cage 'packaged' local scope of nested function? if not, how call nested function local variables? i know running these kind of problems means 1 'doing wrong', i'd understand happens. the nested function loo...

pdo_pgsql and php on mac os x yosemite -

so compiled pdo_pgsql source , added extension php.ini phpinfo() says pdo pdo support enabled pdo drivers mysql, sqlite, pgsql pdo_pgsql pdo driver postgresql enabled postgresql(libpq) version 9.4.2 module version 1.0.2 but pg_connect("host=localhost dbname=dbname user=username password=password") gives call undefined function pg_connect() yes, did restart apache. server_software apache/2.4.10 (unix) php/5.5.20 i on mac os x yosemite 10.10.3 thanks! how make connection so: try { $conn = new pdo('pgsql:host=localhost;port=port-number;dbname=database','db-user','db-pass'); $conn->query("set names utf8"); } catch (pdoexception $e) { die('connection failed: ' . $e->getmessage()); }

asp.net - Multiple errors after switching from VS 2010 to 2013 -

i maintain website using visual studio 2010, asp.net, , vb.net code-behind. yesterday software switched on visual studio 2013 , converted 2010 project 2013 platform. initially, switch didn't seem cause unexpected errors. morning, however, have been unable debug program using breakpoints. receive error: the breakpoint not hit. no symbols have been loaded document. i have checked other stackoverflow questions , have tried multiple solutions, such as: cleaning , rebuilding application rebooting visual studio , running administrator deleting telerik references , adding them again checking make sure debug = true set in web config turning ajax false check if different errors received or fixed checking asp.net option in debugging true checking options window out of place after of this, error still persists. think may have due file not using .net framework 4.5 , using 4.0 instead, not sure how check this. there for-all method set all files 4.5 framework instead of raki...

python - SQLAlchemy - Filter query, exclude parent where one of many children meet criteria -

my sql skills pretty lacking, can't figure out how form query need. i've got 2 db models 1 many relationship, defined this: class parent(db.model): __tablename__ = 'parent' id = db.column(db.integer, primary_key = true) children = db.relationship('child', backref = 'parent', lazy = 'joined') class child(db.model): __tablename__ = 'child' id = db.column(db.integer, primary_key = true) parent_id = db.column(db.integer, db.foreignkey('parent.id')) value = db.column(db.string(140)) i'd able form query return parents meet 3 conditions: 1: have 1 or more children value contains 'value1' 2: have 1 or more children value contains 'value2' 3: have no children value contains 'value3' or 'value4' for example data: parents: id | 1 | 2 | 3 | 4 | children: id | parent_id | value 1 | 1 | 'value1...

android - running multiple AsyncTasks: task.executeOnExecutor not working -

i have college project need use threads run tasks in paralel. started using asynctask , simple task.execute(params), found out not allow multiple asynctasks run, 1 per time. discovered task.executeonexecutor, use this(code inside elevatorcontrol class): taskdesligalampada.executeonexecutor(asynctask.thread_pool_executor, ""); i execute in elevatorcontrol class(which not activity). funny thing is: executeonexecutor not starting doinbackground method of task. tried using logging debuggig this(inside asynctask): @override protected string doinbackground(string... string_qualquer) { //parei aki parece que essa task nÃo executa. problema execute on executor? log.i("elevatorcontrol", "elevador id=" + elevatorcontrol.getidelevador() + ";fechando porta"); this.interfacedaporta.fecharporta(andaratual, this.elevatorcontrol.getidelevador()); return ""; } but log not appear on logcat, means it's not running. tried c...

obtaining ASCII values of input chars in c -

i intending create simple function take string input , output equivalent of string in ascii. plz help.. void cls(){ system("cls"); } void getascii(){ cls(); text(4); char a[94]={' ','!','"','#','$','%','&',"'",'(',')','*','+',',','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','[',"'\'",']','^...

powershell - Local Git Hook Pre-Commit/Pre-Push does not run (Windows) -

i have repo set supposed run simple pre-push/pre-commit powershell script (it doesn't matter when script executes). however, life of me cannot run. have tried use chmod +x .git/hooks/* , chmod ug+x .git/hooks/* have tried editing #!/bin/... , removing have read not supported in windows. know script works because when call via & c:\users\...\.git\hooks\pre-commit.ps1 works. for it's worth here script run: #!/bin/bash echo "script running" & 'c:\users\ian pennebaker\desktop\revisiondate.vbs' start-sleep -s 30 & 'c:\users\ian pennebaker\desktop\movepdf.vbs' cd 'c:\users\ian pennebaker\desktop\test2' pdftk *.pdf cat output ecmwc.pdf & 'c:\users\ian pennebaker\desktop\deleteallbutfinal.vbs' it named pre-push.ps1 said earlier used @ pre-commit or other hook location. have idea wrong here? rename file pre-commit.ps1 pre-commit .

javascript - how to inject controller in routeprovider -

i quite new angularjs, here suggested problem. i have route.js file stores route related stuff. looks this. var app = angular.module('ontology', ['ngroute']); app.config(['$routeprovider', function ($routeprovider) { $routeprovider .when('/abduction', { templateurl: '/partials/abduction.html', controller: 'axiomformctrl', }) .when('/logicdifference', { templateurl: '/partials/logicdifference.html', controller: 'axiomformctrl', }) .otherwise({ redirectto: '/' }); }]); and have file ontology.js has controller , 1 of controller axiomformctrl. var app = angular.module('ontology', ['ngresource', 'ngroute']); app.controller('axiomformctrl', function ($scope, $http) { console.log("in axiom form ctrl...."); }); now if ran program, axiomformctrl undefined . not sure h...

html - Why this submit action dont work with php isset? -

i have code, html register php action when press submit button <html> <head> <title>pruebas de registro </title> </head> <body> <h1 align="center"> formulario de registro </h1> <form align="center" method="post"> <p>user: <input type="name" name="user"></input> </p> <p>pass: <input type="password" name="password"> </p> <p>rpass: <input type="password" name="password2"> </p> <input type="submit" name="submit" value="ok"> </input> <input type="reset" value="reset"></input> </form> <?php if (isset($_post['submit'])) { echo "has presionado submit" } ?> </body> </html> why when press "ok" submit botton php dont me ...

Jmeter JDBC Connection Configuration Parametrization of Database URL for accessing SQL Database -

anyone knows how parametrize database url under jdbc connection configuration. database url: jdbc:sqlserver://ovh-sql1:1433;databasename=user_1 jdbc driver class: com.microsoft.sqlserver.jdbc.sqlserverdriver i want parametrize databasename= user_1 normal parametrization not working here. please suggest. you can use variable database name , configure it. here example: database url: jdbc:mysql://${mysql_hostname}:${mysql_port}/${mysql_database} jdbc driver class: com.mysql.jdbc.driver username: ${mysql_username} password: ${mysql_username}

Import a CSV to Google Fusion Table with python -

from http://fuzzytolerance.info/blog/2012/01/13/2012-01-14-updating-google-fusion-table-from-a-csv-file-using-python/ have edited code import necessary modules, following error "attributeerror: 'module' object has no attribute 'urlencode'". run code , prompted enter password, enter own google account password, , code gives me error message, pehaps need define password somewhere? i wonder if can please trouble shoot code or advise me on how avoid error or advise me of easier way import csv google fusion table own here code import csv decimal import * import getpass fusiontables.authorization.clientlogin import clientlogin fusiontables import ftclient nameagenick = 'c:\\users\\user\\desktop\\nameagenickname.txt' # check see if integer def isint(s): try: int(s) return true except valueerror: return false # check see if float def isfloat(s): try: float(s) return true ...

javascript - How to locate bug from clients view for a syntaxerror -

i have webpage uses various libraries , personal javascript code. i've tested on machine , works. when pushed production user informed page broken. after looking @ console log see page throwing syntaxerror on generic function seems fine. can't reproduce on machine happens on theirs. i'm assuming either different os issue or x-browser version issue (i'm using win-8, chrome using mac, chrome). see how function break , spit out error saying couldn't execute function of undefined. next step in trying identify cause? the syntaxerror "unexpected token (" is there php can inject page more info error? var objbillmanager = { ... objbilltablemanager:{ ... getsbillsstatus(bpayed){ if(bpayed == "1"){ return "payed"; } else { return "not payed"; } }, ... }, ... } without seeing more, it's hard know what's going on. els...

objective c - CGFLOAT_TYPE & Swift -

my situation: i have learnt swift while , swift language i've learnt ios development, means did not learn objective-c systematically. can read oc code little. i got type casting problem when tried translate oc project swift project. i confused type in oc code. objective-c code: static inline cgfloat_type cgfloat_ceil(cgfloat_type cgfloat) { #if cgfloat_is_double return ceil(cgfloat); #else return ceilf(cgfloat); #endif } my unproved guessing: i think function works type casting , cast cgfloat_type different types based on #if , #else . after google cgfloat_type , got know uppercases assembly language . and learnt cgfloat_type declared in cgbase.h , official framework, macro. my problem: when tried write cgfloat_ceil() in swift, can not find cgfloat_type . , ready wrote import coregraphics on head of file. but when wrote #if cgfloat_is_double & #else & #endif , code show on screen color, mean, complier drop no error. complier can not r...

c++ - SIGSEGV error with BFS Algorithm -

i have bfs algorithm error. have tried debug gdb don't understand why this. can tell me why sigsegv error code below. depend on compiler use how pointers addressed? there invalid pointer error in code #include<iostream> #include<stdlib.h> #define true 1 #define false 0 using namespace std; const int max = 8; struct node { int data; node *next; }; class graph { private: int visited[max]; int q[8]; int front, rear; public: graph(); void bfs(int v, node **p); node *getnode_write(int val); static void addqueue(int *a, int vertex, int *f, int *r); static int deletequeue(int *q, int *f, int *r); static int isempty(int *f); void del(node *n); }; // initialize data memeber graph::graph() { for(int = 0; < max; i++) visited[i] = false; front = rear = -1; } // function implements breadth first search (bfs) algorithm void graph::bfs(int v, node **p) { node *u; visited[v-1] = true; cout...

javascript - ember-cli "TypeError: desc.get is not a function" after upgrade of ember-cli -

after updating ember-cli v0.2.7 ember v.1.12.0 i'm having funny behavior causes exception when using computed properties. used model: user = ember.object.extend md5: "" gravatar: (-> return get_gravatar(@get("md5")) ).property("md5") calling u.get("gravatar") in router, aftermodel method, this: u.get("gravatar") ember.debug.js:15588 uncaught typeerror: desc.get not function @ object.get (../vendor.js:26142:19) @ exports.default.mixin.mixin.create.get (../vendor.js:39811:27) @ eval (eval @ evaluate (unknown source), <anonymous>:1:3) @ object.injectedscript._evaluateon (<anonymous>:895:55) @ object.injectedscript._evaluateandwrap (<anonymous>:828:34) @ object.injectedscript.evaluateoncallframe (<anonymous>:954:21) @ aftermodel (../v4.js:3438:16) @ applyhook (../vendor.js:55667:32) @ object.handlerinfo.runsharedmodelhook (../vendor.js:53668:22) @ o...

python - Cython Extension Type inheriting from int cause a MemoryError -

i trying make extension type inheriting int or cython.int. necessary me need able use type index lists/arrays. here code reproduce bug on python 2.7.9 win32 (i'm running windows 7) cython v0.22 on anaconda: import cython cimport cython import sys cdef class extendedint(int): #cdef object __weakref__ # explicitly enable weakref extension type, self-destruct when no longer referenced. def __add__(a, b): return a+b # simple test case def main(): total_it = 1000 in xrange(total_it): j in xrange(10000000): extendedint(j) sys.stdout.write("\rgenerating lists of extendedint : %i/%i" % (i, total_it)) what happens if try create lots of extendedint, @ moment python interpreter crash memoryerror. code snippet above, on machine 4 gb memory crashes @ 11th iteration, vary depending on machine specs. tried enable weakref doesn't fix issue. however, if replace "cdef class extendedint(int):" "clas...

Android Canvas update line coords -

i have drawn line starting @ point (always zero) , ending @ point b using canvas.drawline(xstart, ystart, xend, yend); but point b draggable, want update canvas line xend , yend b position when dragged. problems when update line coords thorows error 1 line explanation: "fatal signal 11 (sigsegv), code 1, fault addr 0x10c in tid 5638 (xample.launcher)" says xample.launcher packagename com.example.launcher, don't know if problem there here goes code. drawview (point b) import android.app.activity; import android.view.view; public class drawview { string label; int color, direction, x, y; view view; drawpath path; public drawview(){ } public drawview(string label, int color, int direction, int x, int y, view view){ this.label = label; this.color = color; this.direction = direction; this.x = x; this.y = y; this.view = view; } public string getlabel() { return label; } public void setlabel(string label) { this.label = label;...

Android - How to get ripple effect on GridView items? -

i have implemented image gallery using gridview. layout grid item: <framelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:descendantfocusability="blocksdescendants" > <imageview android:id="@+id/media_item" android:layout_width="match_parent" android:layout_height="match_parent" android:contentdescription="@string/thumbnail_for_image" android:scaletype="centercrop" /> <view android:id="@+id/overlay_view" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/selectableitembackground" /> </framelayout> my goal nice material ripple effect upon touching grid item. unfortunately, couldn't manage...

css - Linear gradient not working in Safari and Internet Explorer -

i can below linear-gradient show on chrome , firefox not in safari or internet explorer. could tell me i'm going wrong? background: -moz-linear-gradient(left, rgba(5,5,5,0) 48%, rgba(5,5,5,1) 49%, rgba(5,5,5,1) 51%, rgba(5,5,5,0) 52%, rgba(5,5,5,0) 54%); background: -webkit-gradient(linear, left top, right top, color-stop(48%,rgba(5,5,5,0)), color-stop(49%,rgba(5,5,5,1)), color-stop(51%,rgba(5,5,5,1)), color-stop(52%,rgba(5,5,5,0)), color-stop(54%,rgba(5,5,5,0))); background: -webkit-linear-gradient(left, rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%); background: -o-linear-gradient(left, rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%); background: -ms-linear-gradient(left, rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%); background:linear-gradient(to right, rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0...

Open Image from solution folder vb.net -

i need open image solution folder (the name of folder images) image copied directory, tried this: dim src string = "../images/logos/" & imagename dim myimage system.drawing.image = system.drawing.image.fromfile(src) but no works, works if put directory path like: c:/.../imagename.jpg go 2 directories... (solution folder\bin\release) dim src string = "..\..\images\logos\" & imagename

javascript - Can you, and if so how do you get the default cursor as an Image? -

is there anyway can users default cursor texture in javascript image object? not really. each browser free display whatever want cursor , there no api query image use. check browser name , version , download image source when it's oss project ... yeah. that said, can define own cursors: cursor: url('some-cursor.ico'), default; that way, try make browser use known image. related: css custom cursors

javascript - JQuery Razor MVC Not Working -

i'm having issue jquery isn't firing on button click. i've been looking through chrome debugger nothing coming up. no errors , when button clicked nothing happens. i using fresh build of mvc initial references web api , mvc. plugin wish working menu slider here i have tried strip out as possible, sidr.js , sidr.css same taken above link. can see i'm doing wrong? i've reordered scripts jquery-1.9.1.min load first still no dice. update i have rebuilt below code on computer, same iis, visual studio etc , works (with button) making jquery not run (i've gone through references , match up) i'm out of ideas. layout <!doctype html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>@viewbag.title</title> <script src="@url.content("~/scripts/jquery-1.9.1.min.js")"></script> <script src="@url.content("~/sc...

ruby - How do I ADD the pg gem in the production environment in Rails -

i new programming , using rails on cloud9 ide. having difficulty trying push app heroku. error:... push rejected, no cedar-supported app detected remote: hint: occurs when heroku cannot detect buildpack remote: note: tutorial following tells me @ heroku setup section: heroku uses postgresql database (pronounced “post-gres-cue-ell”, , called “postgres” short), means need add pg gem in production environment allow rails talk postgres:17 group :production gem 'pg', '0.17.1' gem 'rails_12factor', '0.0.2’ end question: how add pg gem in production environment (i suspect push rejected error due this) there should file in application called gemfile open , add: group :production gem 'pg', '0.17.1' gem 'rails_12factor', '0.0.2’ end save file, commit , try again.

php - Remove INTL extension support in cakephp -

i using cakephp 3.0 framework. there way use cakephp framework without intl extension support? i suggest install it. in case absolutely impossible install try plugin: https://github.com/hraq/cake-intl it fake presence of intl classes, not able use of i18n features of cakephp.

ios - MPMoviePlayerViewController not playing the video mp4 -

https://dl.dropboxusercontent.com/u/52719649/69090d547c8d47dd27b6d271649c59ae.mp4 nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentsdirectory = [paths objectatindex:0]; nsstring *path = [documentsdirectory stringbyappendingpathcomponent:@"samplevideo.mp4"]; nsurl *url = [nsurl fileurlwithpath:path]; self.controller = [[mpmovieplayerviewcontroller alloc] initwithcontenturl:url]; [self.controller.movieplayer setcontrolstyle:mpmoviecontrolstyledefault]; [self presentmovieplayerviewcontrolleranimated:self.controller]; [self.controller.movieplayer play]; you need recompress video current compression incorrect: h.264 main profile level 4.0 video here guidance form apple: h.264 baseline profile level 3.0 video, 640 x 480 @ 30 fps. (the baseline profile not support b frames.) mpeg-4 part 2 video (simple profile) the audio might need changed according to: (...) class suppor...

How to specify constructor when registrating class in asp.net 5 with default Dependecy Injection -

is there possibility instantiate class using asp.net 5 default dependency injection when class have constructor parameters? i register repository constructor accepts connection_string . update i think can rephrase question. specify constructor called when class being registered. similar autofac have. possible? builder.registertype<configreader>() .as<iconfigreader>() .withparameter("configsectionname", "sectionname"); unfortunately, out of box di container not support parameter constraints. or nothing. if want advanced features, can switch di container, autofac, mentioned , supported in asp.net 5.

VBA Error 438, PPT slide movement using values in Excel -

with code below receiving 438 error when try move slide section has been created. last 4 lines of code. sorry if code not clear, new vba. private sub copyandpastetoppt(counter integer) dim nextshape integer dim issuename string dim issuedesc string dim cfonumber string dim indname string dim cat1 variant issuename = worksheets("data_sheet").cells(counter, 1) issuedesc = worksheets("data_sheet").cells(counter, 3) cfonumber = worksheets("data_sheet").cells(counter, 5) indname = worksheets("data_sheet").cells(counter, 7) cat1 = worksheets("data_sheet").cells(counter, 9) set pp_slide = pp_file.slides(counter + 1) pp_slide.shapes.addshape type:=msoshaperectangle, _ left:=0, top:=0, width:=276, height:=59 nextshape = pp_slide.shapes.count pp_slide.shapes(nextshape).textframe.textrange.text = issuename pp_slide.shapes(nextshape).textframe.textrange.font.size = 16 pp_slide.shapes(...

spring cloud - How to configure SpringCloud Eureka instance to point to https on non standard port -

i using spring boot/cloud actuator, , annotate application class @enableeurekaclient, applications comes , registers correctly eureka server. however, because configure application run on https, , on port 8444, eureka instance not registered correct protocol, instead using http. example http://localhost:8761/eureka/apps/ gives me <homepageurl>http://localhost:8444/</homepageurl> <statuspageurl>http://localhost:8444/info</statuspageurl> <healthcheckurl>http://localhost:8444/health</healthcheckurl> there no such thing securehomepageurl or securestatuspageurl - securehealthcheckurl exists. check com.netflix.appinfo.eurekainstanceconfig properties transmitted server when eureka client registers. however, having home/status/health page urls not showing https protocol doesn't mean instance isn't registered. matters whether or not secure port enabled. check following properties in client configuration: eureka.instance.se...

c# - Using variable number of functions -

ex: in app1 user creates function_1() , function_2(). in app2 user wants call function_2(). searched on google , thing found write code: class program { [dllimport("functions.dll")] public static extern void function_1(); static void main(string[] args) { function_1(); } } you'll have use pinvoke code dll loaded ( loadlibrary ) , function pointer ( getprocaddess ) , marshal.getdelegateforfunctionpointer obtain delegate can invoke.

c# - Icon displayed by windows 7 changes to default icon if executable is moved -

my c# window 7 winforms program displays custom icon when run visual studio output directory. when move executable desktop , run it, default windows winforms icon displayed. how windows display correct icon when executable moved? your icons should stored in folder in solution (best 'solution\resources\images\x.extension') , added visual studio ide (he creates reference). when deploy application, should give user shortcut of executable. here secret.

smartface.io - Data.Dataset1.refresh() method does not work in the Smartcafe -

after inserting values dataset binded repeatbox have used refresh() method not changes in repeatbox. i can see changes when page load again. data.dataset1.add(); data.dataset1.name = "deneme"; data.dataset1.commit(); data.dataset1.refresh(); there mistake in codes? you can use data.notify("data.dataset1"); try this: data.dataset1.add(); data.dataset1.name = "deneme"; data.dataset1.commit(); data.notify("data.dataset1");

Errors Adding Foreign Keys (MySQL) (Error Code 1215) -

i trying add foreign key between 2 different sets of tables, first set customer , shopping_cart. tried looking @ other posts regarding error couldn't work after looking @ them. create table `usale`.`customer` ( create table `usale`.`customer` ( `customer_id` smallint unsigned not null auto_increment, `first_name` varchar(45) not null, `last_name` varchar(45) not null, `email` varchar(50) null default null, `active` tinyint(1) not null default true, `create_date` datetime not null, `last_update` timestamp null default current_timestamp, `student_student_id` bigint not null, `student_school_id` bigint not null, `shopping_cart_cart_id` tinyint unsigned not null, primary key (`customer_id`, `student_student_id`, `student_school_id`)), index `fk_customer_student1_idx` (`student_student_id` asc,`student_school_id` asc), index `fk_customer_shopping_cart1_idx` (`shopping_cart_cart_id` asc), constraint `fk_customer_student1` foreign key (`student_student_id`) references `usale`.`stude...

centos - Install php-devel -

i install php-devel on server(centos 6.5). yum install php-devel however, encountered following error. error: php54-cli conflicts php-cli-5.3.3-40.el6_6.x86_64 error: php54 conflicts php-5.3.3-40.el6_6.x86_64 error: php54-common conflicts php-common-5.3.3-40.el6_6.x86_64 try using --skip-broken work around problem try running: rpm -va --nofiles --nodigest could tell me how solve problem? it's because have chose between packages 5.4 , 5.3 i'll suggests : yum remove php.* sudo yum install php53-common php5-devel php5-cli

tomcat - "The type java.util.Map$Entry cannot be resolved" (tomcat6 + JDK7) -

Image
i've jsp app gives me error: the type java.util.map$entry cannot resolved. indirectly referenced required .class files stackoverflow full of post error, all of them solve compiling .java files using jdk7 , plus using tomcat same version (i mean, below jdk8 seems problem, because ide version , tomcat versions doesn't support it). the problem i've built app ( .java files) using jdk 1.7.0_79 , plus i've tomcat 6 server using same one . so there's no jdk 8 anywhere... screenshots data: my jvm directory: error stacktrace: tomcat process (running using jdk7): javac version used compile: any idea why still error? thank in advance run tomcat java 6 or upgrade tomcat 7 , make sure don't have old pre-java 5/pre-generics library on classpath. why error? somewhere in jsp code (not code, mind), dependency on java.util.map.entry . in code jasper generates jsp. it's not direct dependency; rather code (or java code generated ...

border container - Using BorderContainer inside TabContainer in dojo -

i need use bordercontainer inside tabcontainer in dojo. requirement have 3 different pane inside each of tab create. trying use bordercontainer inside tabcontainer seems not working. here trying. a,b , c tabs trying create.inside using contentpane each of them , bordercontainer specify left,center , right region particular tab. but not giving me output. please advise doing wrong here. <div data-dojo-type="dijit/layout/tabcontainer" data-dojo-props="splitter:true, region:'top'"> <div data-dojo-type="dijit/layout/contentpane" title="a" selected="true" data-dojo-props="splitter:true"> <div data-dojo-type="dijit/layout/bordercontainer" data-dojo-props="guuers:false"> <div data-dojo-type="dijit/layout/contentpane" data-dojo-props="splitter:true,region:'left'">left pane of tab a</div> ...

php - Apache crashes on installing Magento extension -

i installing magento extenion on magento loacalhost.i following error , xampp crashes. problem signature: problem event name: appcrash application name: httpd.exe application version: 2.2.21.0 application timestamp: 4e6b3136 fault module name: php5ts.dll fault module version: 5.3.8.0 fault module timestamp: 4e537a04 exception code: c00000fd exception offset: 0018a7a3 os version: 6.1.7601.2.1.0.256.48 locale id: 1033 additional information 1: e339 additional information 2: e339f2594e7f681a95b166793376bebb additional information 3: ad95 additional information 4: ad95c11efe6aa075e55981fe5bf8d4b5 but if disable extension xampp works well. how fix it? i found following solution on link appcrash php-error-faulting-module-name-php5ts go following file c:\xampp\apache\conf\extra\httpd-xampp.conf set comment on following line. #loadfile "d:/xampp/php/php5ts.dll" #loadmodule php5_module "d:/...

c# - Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on -

i have scenario. (windows forms, c#, .net) there main form hosts user control. the user control heavy data operation, such if directly call usercontrol_load method ui become nonresponsive duration load method execution. to overcome load data on different thread (trying change existing code little can) i used background worker thread loading data , when done notify application has done work. now came real problem. ui (main form , child usercontrols) created on primary main thread. in load method of usercontrol i'm fetching data based on values of control (like textbox) on usercontrol. the pseudocode this: code 1 usercontrl1_loaddatamethod() { if (textbox1.text == "myname") // gives exception { //load data corresponding "myname". //populate globale variable list<string> binded grid @ later stage. } } the exception gave was cross-thread operation not valid: control accessed thread other thread created on...

php - How do you access a child method -

how access child method eg.? class { public function start() { // somehow call run method on b class inheriting class } } class b extends { public function run() { ... } } $b = new b(); $b->start(); // should call run method class a should not try call methods not define. work fine scenario: class { public function start() { $this->run(); } } however, fail terribly should this: $a = new a; $a->start(); what you're trying here sounds use case abstract classes: abstract class { public function start() { $this->run(); } abstract function run(); } class b extends { public function run() { ... } } the abstract declaration precisely prevent shooting own foot trying instantiate , start a without extending , defining required methods.

How to install authentication plugins in grails 3.0.1? -

i want install authentication plug-in in grails project used grails install-plugin spring-security-core command gives error: error command not found install-plugin did mean: install or list-plugins or plugin-info?. grails version : 3.0.1 i new grails not able understand how install plug-in in it. in grails 3 install-pugin removed. it's enough add dependency in projects build.gradle install desired plugin. in case install spring-security-core plugin add dependency follow: dependencies { ... compile "org.grails.plugins:spring-security-core:3.0.4" ... } and run grails run-app , check plugin installed.

javascript - Persisting checked state using localstorage -

i have taken following snippet asked question on how store checked/unchecked status of checkboxes on page in localstorage: $(function(){ var test = localstorage.input === 'true'? true: false; $('[type="checkbox"]').prop('checked', test || false); }); $('[type="checkbox"]').on('change', function() { localstorage.input = $(this).is(':checked'); console.log($(this).is(':checked')); }); when select 1 of checkboxes , refresh page, once reloads every single checkbox checked. how make store each individual checked state? note may have between 0 - 50 check boxes available depending on how many outstanding records there in gridview don't have fixed input id's use record id associated each row. if want rely on localstorage solution, may this: $(function(){ $('[type="checkbox"]').each(function () { var $this = $...

Encrypt Data on mySql server without using php function -

i have system interact customers , customers insert personal , confidential data. we using laravel 5. can encrypt data in mysql server without using php functions?. same way should able retrieve data after decrypting. went though link http://thinkdiff.net/mysql/encrypt-mysql-data-using-aes-techniques . but says have use php code level. any suggestions great. thanks in advance

rdp - Vb.net kill process -

i've problem resolve is: need kill process when user disconnect (not logg off) rdp session. this app makes established connection running ever if user forget logging off windows rdp session , need kill it. thanks in advance create application following: enumerate rdp sessions , find out disconnected. enumerate processes , find out (a) belong target app , (b) belong disconnected session. kindly ask app close itself . use task scheduler run application every few minutes administrative permissions.

Changing variable type of R dataframe inside a list -

i have list of dataframes , need transform variable in each of dataframes factor. e.g. mylist <- list(df1 = data.frame(a = sample(10), b = rep(1:2, 10)), df2 = data.frame(a = sample(10), b = rep(1:2, 10)) ) lets variable b needs factor in each dataframe. i've tried this: tmp <- setnames(lapply(seq_along(mylist), function(x) apply(mylist[[x]][c("b")], 2, factor)), names(mylist)) but returns transformed variable, not whole dataframe need. know how loop, don't want resort that. per comment david arenburg, solution should work: tmp <- lapply(mylist, function(x) {x[, "b"] <- factor(x[, "b"]) ; x}) ; str(tmp)

vba - Excel Macro - Search Google for Phone number -

i build macro in excel opens google chrome , searches contents (which company names) of column f, , saves phone number of company column g. phone number of many companies pops in results. if phone number cannot found, (at least) have excel open google , search information without me having copy , past hundreds of times. also, keep system crashing or many google tabs opening, macro search selection have made... attempting implement code found below. have admit, inexperienced vba user. can give great... , apologize ignorance. sub xmlhttp() dim url string, lastrow long dim xmlhttp object, html object, objresultdiv object, objh3 object, link object dim start_time date dim end_time date lastrow = range("f" & rows.count).end(xlup).row dim cookie string dim result_cookie string start_time = time debug.print "start_time:" & start_time = 2 lastrow url = "https://www.google.co.in/search?q=" & cells(i, 1) & "&rnd=...

rest - Is there a way to get paginated reports with OpenX API? -

i using openx api integrate application. trying fetch report data using /report/run route. the doc says json report_format limited 1000 rows. paginated? or there way rest of data or option si go csv? here link docs.

ios - BLE advertising data not received from android device -

using corebluetooth trying detect ble peripheral transmitting advertisement , scan response packets. packet sniffer able find advertisement scan response data iphone detects scan response. looks ios rejecting advertising data. i able receive advertising data other devices properly. possible debug starting points ? note: periferal device spec indicates not set 3 optional ble packet bytes while transmitting advertising data. advertising packets used notify periodically possible central devices of ble device presence. advertising packet can contain information if device can connected or not, , few other data. scan response should place should focus pack important data. on ios should rely on scan response deliver important identification data. on android have more flexibility, such accessing both advertising packet , scan responses. make sure play along both platforms, keep advertising simple device visible central, , store data in scan response.