Posts

Showing posts from May, 2012

How can I validate diverse barcode encodings using PHP? -

i'm tasked validating gtin-14, gtin-13, gtin-12, gtin-8 , upc-e barcodes. have seen few functions here , there, i'm unclear on how validate code without knowing ahead of time standard in use. i assume must possible, i'm @ loss should begin. validating content of barcode shouldn't problem. take @ specification different gtin-formats. problematic part check existence of required gs1 symbol identifier. commonly used libs barcode decoding (zxing, zbar) not give symbol identifier. exception zxing code-128. if have check other carrier types have commercial decoders. take @ question more details.

serial port - c#: strange shift in data buffer during communication with device -

in app have receive , process data device, connected through com port. partially. in particular device first 2 bytes length of packet (minus 2 since doesn't take account these 2 bytes; length of rest of packet after all). then, since know device tends send me data slowly, read rest of packet in loop, until data has been read. right here encountered strange problem. let's assume entire packet (including these first 2 bytes length) looks this: ['a', 'b', 'c', 'd', 'e']. when read first 2 bytes ('a' , 'b'), i'd expect rest of packet this: ['c', 'd', 'e']. instead, looks this: ['b', 'c', 'd', 'e']. how come second byte of response still in read buffer? , why second one, without previous one? the code below shows how handle communication process: //the data array array output data //the size array two-byte array store frame-length bytes //the results array devi...

php - In CodeIgniter 2.2.0, why does the form validator not invoke my custom validation routine on array input data? -

here's situation: while building project in codeigniter 2.2.0, attempting validate tabular form custom data validator. tabular form set transmit post data server in standard array format, , using non-zero based numeric keys. keys, encode important data, happened start 1 on form attempting debug. noticed codeigniter's form_validation class invoking validator on 2nd , 3rd row of data (with keys 2 , 3, respectively) not first row (with key 1). why should so? codeigniter form_validation documentation indicates can use non-numeric array keys, 1 expect non-zero numeric array keys work too. after debugging, found form_validation::_execute() (in system/libraries/form_validation.php) has $cycles variable, zero-based integer, measures number of times particular rule has been invoked on array-based input. unfortunately, __execute() function uses $cycles variable reference elements of post data (e.g., line 552 in build, appears 2.2.0). has result of bypassing input a...

ffmpeg - nginx +unicorn+rails+"upstream prematurely closed connection while reading response header from upstream" 502 bad gateway error -

i've been scratching head on 502 gateway error while converting video(approx 10mb) using ffmpeg. files of less 2mb works fine when try upload + convert using webrick ,it works fine. have client_max_body_size 1g set. for testing purpose have added these in nginx conf file proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s; send_timeout 600s; proxy_buffer_size 32k; proxy_buffers 4 32k; proxy_busy_buffers_size 32k; proxy_temp_file_write_size 32k; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; timeout unicorn set timeout 300 , in unicorn.rb please help.

c# - Centering a label inside a SplitContainer does not work -

i trying center label inside splitcontainer using code: label1.location = new point((label1.parent.clientsize.width / 2) - (label1.width / 2), (label1.parent.clientsize.height / 2) - (label1.height / 2)); this looks working @ first. using label hold title of document. after loading same document again, putting same text inside label again , calling same method again, center label, label put down 5 pixels. has idea why happen? €: seeing splitcontainers(which parent) height changes after form1_load 20 25 edit2: private void splitcontainer1_panel1_sizechanged(object sender, eventargs e) { label1.location = new point((label1.parent.clientsize.width / 2) - (label1.width / 2), (label1.parent.clientsize.height / 2) - (label1.height / 2)); }

jquery - Dynamically change a ruby variable based on dropdown without refresh -

i looking dynamically change ruby variable based on dropdown box in view template. in example - have results page , want change number of results based on dropdown. if select 5 - want number variable update 5 , loop display 5 items. i want without page refresh. thanks! html: <form action="/form" method="get", name="myform" id="myform" role="form"> <input type="text" id="text1"> </form> <select id="filterresults" name="filterresults"> <option value=4>4</option> <option value=9>9</option> </select> <div id="resultstable"> <%@myarray[0..@number].each |i| %> <%=variable1%> <%end%> </div> jquery: $("#filterresults").change(function(){ var numresults = document.getelementbyid('filterresults').value; var input = $("<input...

python animation ... passing an argument -

i have simple python animation program downloaded. changing around understand animation calls little better. program makes simple dot move in circle on screen. placed functions change dot's position , animation calls each class. worked ok. put definition of figure class. works ok too. how looks, import numpy np import matplotlib.pyplot plt import matplotlib.animation animation class fig: def __init__(self): self.fig=plt.figure() self.ax = self.fig.add_subplot(111) self.line, = self.ax.plot([], [], 'bo', ms=10) self.ax.set_ylim(-1, 1) self.ax.set_xlim(-1, 1) class sd: def simdata(self): t_max = 100.0 dt = 0.001 x = 0.0 t = 0.0 while t < t_max: x = np.sin(np.pi*t) t = t + dt y = np.cos(np.pi*t) yield x, y class sp: def simpoints(self,simdata): x, t = simdata[0], simdata[1] f1.line.set_data(t, x) retur...

Javascript Three.js point camera at fixed coordinate -

in javascript three.js, given coordinates of camera , coordinates of point ( x , y , z ), how rotate camera directly @ point? you can make camera "look at" world-space point using lookat() method, so: var point = new three.vector3( x, y, z ); camera.lookat( point ); note: method limited, in not work correctly if camera child of rotated or translated parent object. however, if camera has no parent, or if camera child of scene directly, method work expected. three.js r.71

python - to retrieve values of multiple radio buttons and form fields in views.py django -

i want receive radio button values table generated within form multiple times in views.py in django. my templates file : <form action = "/appname/accept" method = "post" {% l in list %} <table> <tr> <td>{{l.value}}</td> </>tr </table> <input type = "radio" name = "acceptance" value ="accept">accept</input> <input type = "radio" name = "acceptance" value ="reject">reject</input> {% endfor %} <input type ="submit" name = "submit">submit</input> </form> that means rendered page : value 1 accept reject value 2 accept reject and on submit button as user clicks submit button, want collect values of radio buttons each value table rows how in views.py? know if give common name radio input here "acceptance...

oop - Invoking constructor of abstract base class in Fortran -

consider 1 of classic oop examples (see source code @ end of post): abstract base class shape class rectangle extending shape questions: in source code below i've tried define constructor abstract class shape using class(shape), pointer :: this result without ever allocating pointer. correct way of defining constructor abstract class in fortran? how can invoke constructor of base class (shape) in constructor of extending class (rectangle)? example source code updated suggestion ed smith works non-abstract base classes. module shape_mod implicit none private public shape type, abstract :: shape private double precision :: centerpoint(2) contains procedure :: getcenterpoint procedure(getarea), deferred :: getarea end type shape interface shape module procedure constructor end interface shape abstract interface function getarea(this) result(area) import ...

java - Read all lines from a text file and save each to it's strings (without using List) -

i have text file game save java game (cookie clickers) stuff in file numbers without spaces. so: 10 20 30 40 50 i need read lines , save each 1 string. so strings should this, can use them lot easier: lives = 10 kills = 20 score = 30 ... the saving code in class file (save.class). need code, other stuff should not problem. is there kind of easy way make work want? you can use scanner follows: scanner s = new scanner(new file("your file")); string lives = s.nextline(); string kills = s.nextline(); string score = s.nextline(); ... s.close();

clips - how to fuzzify in fuzzyclips? -

i want write project precise value calorie calculate precise value of part(how weight increased?).this rule: if calorie high increase weight for have set calorie: (highcalorie (20 0)(40 .2) (60 .5) (100 .8) (180 1)) and in other hand value of increase weight have set: (increase(50 0) (100 .4) (120 .8) (150 1)) in other word want map value calorie increase weight. write code : (deftemplate calories 20 180 (high(20 0)(40 .2) (60 .5) (100 .8) (180 1)) ) (deftemplate fat 50 150 (increase(50 0) (100 .4) (120 .8) (150 1)) ) ; first precise value calorie , fuzzify it. (defrule getcalorie (declare (salience 100)) => (printout t "enter calorie: ") (bind ?t (read)) (assert (calorie ?t)) ) (defrule fuzzifycalorie (calorie ?t) => (assert (calories (?t 0) (?t .2) (?t .5)(?t .8)(?t 1)))) ; here add rules prescribe amounts of increased weight (defrule result (declare (salience -1)) (calories high) => (assert...

javascript - getting store attr in a route emberjs -

i'm fetching user using: var user = this.store.find('user', user_id); here user model: export default ds.model.extend({ username: ds.attr('string'), email: ds.attr('string'), first_name: ds.attr('string'), last_name: ds.attr('string'), password: ds.attr('string'), is_admin: ds.attr('boolean') }); im trying run before model check if user admin , if true or false, example: beforemodel: function(){ var user = this.store.find('user', 1); if(user.get('is_admin')){ return 'do since admin'; } }, i tried doing instead: beforemodel: function(){ var user = this.store.find('user', 1); return user.then(function(response){ if(response.is_admin){ return 'do since admin'; } }); }, how can is_admin attribute in route? you define isadmin property in route, , set when user promise resolved. //rou...

css3 - css blur technique only for the background -

this question has answer here: how apply css 3 blur filter background image 9 answers i want blur background image of html code using css3 filter , please provide explanation. <!doctype html> <html> <head> <title>student-login</title> <link href='http://fonts.googleapis.com/css?family=slabo+27px' rel='stylesheet' type='text/css'> <style> body{ background-image: url("background.jpg"); background-size: cover; background-repeat: no-repeat; background-position: center; background-attachment: fixed; } </style> </head> <body> <div class="main-form"> <h1>hello</h1> </div> </body> </html> but content in not blurred. ...

internet explorer - Will Microsoft Edge use prefixes like -webkit- or -ms-? -

Image
will microsoft edge use prefixes -webkit- , -ms- , or own new prefix future functions? -me- , perhaps? tl;dr: yes , no existing prefixed properties hugely popular remain until have native support, microsoft edge not introducing new prefix system features. instead, they'll use feature flags (like chrome , firefox experimental features on client side, rather developer side). direct source some of more notable removals microsoft edge supports latest standard api definition , removes support ms prefixed versions of apis. examples include css transforms, fullscreen api, , pointer events. brings important topic: vendor prefixes. you’ll see trend in vendor prefixes in microsoft edge compared ie: our support (or lack thereof) of prefixed apis data-driven compatibility sole purpose remain. examples, -webkit-border-radius still in use on over 60% of page loads , ms-prefixed encrypted media extensions apis still in use on top video streaming services. because ...

javascript - Ajax request does not update database until page refresh -

Image
i'm making todo list dashboard system i'm creating. so idea user can add new todo items, delete todo items , finish/unfinish todo items. i'm working in project codeigniter. the problem when i'm adding task added database when delete after or finish it, has not been updated in database. when refresh page , delete task or finish task after updated in database. have checked data , has been succesfuly sended controller , controller model. not updated in database reason. i'm sending data using ajax post requests codeigniter controller. $(document).ready(function () { runbind(); function runbind() { /** * deletes task in list */ $('.destroy').on('click', function (e) { var $currentlistitem = $(this).closest('li'); var $currentlistitemlabel = $currentlistitem.find('label'); $('#main-content').trigger('heightchange'); $.ajax({ url: 'dashboard/delet...

Heroku upload JPG ERROR (ruby on rails) -

i tried push heroku, altering image assets via: adding jpg document. i'm getting sorts of weird errors, now. can y'all this? remote: running: rake assets:precompile remote: i, [2015-06-14t01:03:45.686901 #395] info -- : writing /tmp/build_.../public/assets/....jpg ... remote: tasks: top => assets:precompile remote: (see full trace running task --trace) remote: ! remote: ! precompiling assets failed. remote: ! remote: remote: ! push rejected, failed compile ruby app remote: remote: verifying deploy.... remote: remote: ! push rejected remote: https://git.heroku.com/ ... ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'https://git.heroku.com/...git' actually, problem fixed! before pushing heroku, run: rake db assets:precompile or of nature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

java - Why can't I get any output from my recursive method? -

i'm trying insert characters (a, b, c) , permutation of array. for reason not printing out. i'm sure simple mistake can't find it. appreciative advice. public static void main(string[] args) { int [] = new int []{'a','b','c'}; permute(a, 3); } public static void permute(int[] a, int p){ if(a.length == 0){ return; } for(int = 0; < a.length; i++){ char ch = (char) p; p += a[i]; permute(a,p); p = ch; } } there several problems approach: you use char s when should use int s , vice versa; the program doesn't contain system.out.print statements, never instruct java program print anything; this isn't program enumerates on possible permutations. in fact generate stack overflow exception (not confused name of site), because length of array never changes, call for part , keep building call stack; and it unclear p means. an in-line permutation program loo...

android - Injected view null with roboguice 3 when minifiedEnabled = true -

i using roboguice 3 in application , when minifiedenabled set false in debug mode working fine. if however, set minifiedenabled true injected views seem null: nullpointerexception: attempt invoke virtual method 'void android.support.v4.view.viewpager.setadapter(android.support.v4.view.pageradapter)' on null object reference my proguard config looks follows: -dontobfuscate -dontoptimize -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontskipnonpubliclibraryclassmembers -dontpreverify -verbose -dump class_files.txt -printseeds seeds.txt -printusage unused.txt -printmapping mapping.txt -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* -allowaccessmodification -renamesourcefileattribute sourcefile -keepattributes sourcefile,linenumbertable -repackageclasses '' -dontwarn rx.internal.** -dontwarn retrofit.appengine.urlfetchclient -dontwarn roboguice.** -dontwarn org.roboguice.** -dontwarn com.squareup.okhttp.** -dontwarn okio...

javascript - Angularjs: inject Controller on module inside anonymous function -

i bit newbiew javascript , starting use angular.js so question if there way inject controller inside module declared in anonymous function my code looks app.js (function(angular) { var app = angular.module('organizer', ['ngmaterial', 'nganimate', 'ngaria']); })(angular); sitecontroller.js (function(angular, app) { app.controller('site', function($scope, $mddialog) { var alert = $mddialog.alert({ title: 'test', content: 'testing', ok: 'exit' }); $mddialog.show(alert); }); })(angular); i have tried ways if possible, still see if here explain how can made if could. note: have used angular.js before , wanted try different way declare controllers client wont have way modify it if create module in angular, can not obfuscate in way. in console, user can run angular.module('organizer') access app, , call method wan...

java - JComboBox Cell Renderer Fails with Windows Look and Feel -

i writing java application uses local system , feel. in program there listcellrenderer renders colored dot (a custom jcomponment) followed text given object. works fine when using swing's default metal , feel. however, when use windows , feel, cells rendered correctly in drop-down list, selected item (the 1 displayed when user not in act of selecting different option) renders text , ignores colored dot. if change renderer set font, proper font observed in both drop down , selected item, know cell renderer being used, @ least in part. i've read posts around web different lafs causing problems haven't come across who's discussing particular problem. in case curious here code: . @override public component getlistcellrenderercomponent(jlist<? extends coloreddisplayable> jlist, coloreddisplayable e, int i, boolean isselected, boolean hasfocus) { jpanel cell = new jpanel(new gridbaglayout()); cell.setopaque(false); jlabel label = new jlabe...

How to DRY (myself) in Django form for Create and Edit Form -

i created 2 forms in django same model, named accountcreateform , accounteditform . account model has 3 fields , each of them has few form attributes such max_length , help_text , error_messages . example, class accountcreateform(forms.modelform): name = forms.charfield(max_length=50, required=true, label='account name', help_text='50 characters max', error_messages={'required': 'please enter account name'}) number = forms.charfield(max_length=16, required=true, label='phone number', help_text='10-16 digits max', error_messages={'required': 'please enter phone numbername'}) i want user able edit existing accounts well. so, added form editing purposes follow. class accounteditform(forms.modelform): name_error = { 'max_length': ("name should no longer 50 characters."), 'required': ("please enter account name")} number_error = {'max_length': ("phone ...

Qt: Use tcp socket to get google map image? -

for reason need use blocking call perform image accessing google's server. however, qnetworkaccessmanager seems async, though there many work arounds, calling eventloop.exec(); many people online suggested me not so. so trying use tcp socekt. want access image here: http://mt1.google.com/vt/lyrs=y&x=0&y=0&z=0 and here code: socket = new qtcpsocket(this); socket->connecttohost("mt1.google.com", 80, qiodevice::readwrite); if(socket->waitforconnected(5000)) { qdebug() << "connected!"; // send socket->write("/vt/lyrs=y&x=0&y=0&z=0"); socket->waitforbyteswritten(1000); socket->waitforreadyread(3000); qdebug() << "reading: " << socket->bytesavailable(); // data qdebug() << socket->readall(); // close connection socket->close(); } else { qdebug() <...

Android Studio Which one should be use - Android Test folder or main for adding new java classes -

i new android studio. i created new project , find there 2 folder name - android test , main folder should use add new classes , packages. these folder organized in same ways, means package name folders in both. main/java/your/package/directory/tree application classes, test root unit/instrumental tests' classes

python - how can i connect and send commands to a serial port while another program is using it? -

i using telit he910g card. connected pc directly using minipci slot. using 3g internet connection , a-gps/gps services. my system running linux mint 17.1, 3g connection handled using network manager app , works great. 3g connection started , handled using module part of program writing. code using in order connect serial port this: def _connect_to_device(self): """ connect serial port """ try: self._device = serial.serial(self._filename, baudrate=self._baud_rate) except standarderror, e: raise standarderror("couldn't connect gps device. error: %s" % str(e)) when use python program alone works great. when try , use while 3g on cant connect serial device. wierd thing if try connect using program "minicom" while 3g turned on work. so question is: how can make both run , work together? since mutually exclusive. thanks help. :) ok, solved. the issue telit module has 2 ports /dev/ttyac...

Is it possible to pass parameter inside With Clause in SQL Server SSIS Job? -

i want pass parameter (@date1) in ssis ole db source created variable , tried pass parameter using '?' it's showing 'syntax error, permission violation or other non-specific error' i tried this: select dateadd(second, 1, @date1=?) starttime, --selecting calls next second of last processed time. convert(datetime, convert(char(19), dateadd(minute, -1, current_timestamp), 120)) endtime --trim seconds. but know can pass parameter in condition want pass in clause. possible pass parameter in condition of clause? full query: alter procedure [dbo].[get_call_level_details] ( @date1 datetime ) back_log_pick(starttime, endtime) ( select dateadd(second, 1, @date1) starttime, --selecting calls next second of last processed time. convert(datetime, convert(char(19), dateadd(minute, -1, current_timestamp), 120)) endtime --trim seconds. --15 mins considered max call time. calls before 15 mins backloged , selected. --select '18-mar-2014 18:52:00' starttime, -...

html - Divs move around when i zoom in/out -

my webpage layout changing when zoom in , out on google chrome! here link website: http://party.mccrossings.net i did check other posts did not me out! to keep content div centered, add following properties: #content { width: 800ppx; height: 800px; position: absolute; top: 0px; bottom: 0px; left: 0px; right: 0px; margin: auto; background-color: #fff; }

c# - How can I add controls to a tab control that is inside of a custom control, at design time? -

i have custom control made of 2 main controls, flowlayoutpanel on left side, , tabcontrol on right side. flp used store custom "buttons" change selected index of tab control. have working @ design time can select buttons , move through pages. i'm trying make can drag controls pages, controls being added custom control. any ideas on how accomplish task?

Does Python copy references to objects when slicing a list? -

when list sliced, references contents copied original list? can imagine may not necessary, read opposite ( mentioned in passing ). this question matters instance following idiom, in case of long my_list : for (first_elmt, second_elmt) in itertools.izip(my_list[:-1], my_list[1:]): … a copy use both memory and, presumably, time. compared looping on index of first_elmt xrange() , on list of 100 million integers. slicing approach 20% faster, seem copy references (the system time longer). indeed case? ps : realize quite natural slices copy references: if original list modified, slice not change, easier have implementation of slice copy references of original list. pointer cpython implementation interesting, though. slicing copy references. if have list of 100 million things: l = [object() in xrange(100000000)] and make slice: l2 = l[:-1] l2 have own backing array of 99,999,999 pointers, rather sharing l 's array. however, objects pointers refer not cop...

c# - Gridview Search box in ASP.NET -

i have made search box using textbox , button control search data in gridview, datasource i'm using objectdatasource. in objectdatasource class i'm using parameterized procedure select data database table, problem occured here, objectdatasource expect value parameter class . have solved hardcoded class if null give parameter value equals white space, works good. if there way solve without hardcoded class, answers helpful, thanks here objectdatasource select class public static list<t_penerbit> getsearchpenerbit(string cari) { if (string.isnullorwhitespace(cari)) { cari = " "; } list<t_penerbit> listsearchpenerbit = new list<t_penerbit>(); string cs = configurationmanager.connectionstrings["cs_perpustakaan"].connectionstring; using (sqlconnection con = new sqlconnection(cs)) { sqlcommand cmd = new sqlcomman...

c# - Changing In DateTime Format -

i have changed format dd-mm-yy in backend of page, want save date in'dd-mm-yy' format e.g.'23-02-2015' in database.and retreieve in format, using datetime picker in text field...i changed format of date picker 'dd-mm-yyyy' not saving data in format , cause below error string not recognized valid datetime. any suggestions? simply don't use strings represent dates. the datetime struct of c# maps sql server's datetime data type directly , meaning can send datetime struct parameter value in sqlcommand object (i hope using parameterized queries or stored procedure. if not, start using them right now, unless want vulnerable sql injection attacks.) read here , there difference between display format , storing format of date values in sql server.

ios - UIImageView doubles and changes size -

Image
i'm having problem driving me nuts while , can not explain going wrong. have uitableview different views , 3 prototype cells select from. if i'm in group mode show prototype applicationcell form storyboard. first entry looks ok, if have 2 image in second entry doubles , resizes image shown twice - in correct size , again resized cell height (also there exists 1 image in per cell), see image: here relevant code causes problem: - (uitableviewcell *)tableview:(uitableview *)table cellforrowatindexpath:(nsindexpath *)indexpath { if(app == nil && groupedmode) { uitableviewcell *cell = [table dequeuereusablecellwithidentifier:@"applicationcell" forindexpath:indexpath]; uilabel *head = (uilabel*)[cell viewwithtag:2]; uilabel *badge = (uilabel*)[cell viewwithtag:3]; uilabel *lastmsg = (uilabel*)[cell viewwithtag:4]; uiimageview *imgview = (uiimageview*)[cell viewwithtag:1]; ...

c# - After modifying machine.config VS crashes, also many components -

i trying add <system.transactions> <machinesettings maxtimeout="02:30:00"> </machinesettings> </system.transactions> section end of machine.config local file test out transaction lasts long. transaction initialized local windows app communicating sql server. so end of machine.config file looks like: ... </providers> </rolemanager> </system.web> <system.transactions> <machinesettings maxtimeout="02:30:00"> </machinesettings> </system.transactions> </configuration> this machine config file now. i modifying both c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config c:\windows\microsoft.net\framework64\v4.0.30319\config\machine.config i following advice given @ link but, when , reopen app, vs studio project loading fails message: .net trace handling fails. please check .net machine , enterprise configuration. should els...

java - Get Server Name in TCP Server -

is possible server address used tcp client? client can reach server using either ip address or host/domain name. i'm trying domain name using: serversocket ss = new serversocket(port); socket s = ss.accept(); system.out.println(s.getlocaladdress().gethostname()); system.out.println(s.getlocaladdress().getcanonicalhostname()); but ip address, always! in http server, can achieve same using httpservletrequest.getservername() . returns ip address if http client uses ip address , returns domain name if http client uses domain name. i'm quite sure should possible @ tcp level also. if tried localhost server bring name, might dns problem tho; anyway try localhost server , if worked go %systemroot%\system32\drivers\etc\hosts , define host names. check out. hope help.

c - Unix serial port programming: How to get number of bytes in output buffer? -

i know possible number of bytes in serial port input buffer using ioctl fionread example shows in "serial programming guide posix operating systems" (link: http://www.cmrr.umn.edu/~strupp/serial.html#5_1_3 ). there way same output buffer? i ask because want know when bytes have been transmitted. on windows, can done looking @ cboutque in comstat structure still have not found way in unix based systems. if os supports consider ioctl tiocoutq. like tiocinq/fionread it's not posix though.

Suppressing the Data Link Properties dialog box in Excel using VBA -

while refreshing workbooks pivots (that externally linked excel file containing data) using vba ( .refreshall), dialog box titled "data link properties" pops up. i tried suppress dialog doevents delays, application.screenupdating=false, application.displayalerts=false, oledb.backgroundquery=false. nothing seems working. to make matters more confusing, dialog box doesn't pop regularly. does, doesn't. my debugging attempts has lead 1 theory: caused size of data file, , thereby memory excel taking in ram. dialog doesn't seem pop when both of these small. when file approaches more 10mb, dialog becomes more frequent. feel has memory, though there's @ least 1 gb of available memory. makes no sense i've run out of ideas. another clue: if click cancel on data link properties , click refreshall button on ribbon: gives "an unspecified error" , other errors related data file not being found, though path valid, , file exists. it refresh without...

http - Parse.com Cloud Code Google Maps API Geocoding returns ZERO_RESULTS -

i wrote following parse.com cloud code function: parse.cloud.define("googleapilatlong", function(request, response) { parse.cloud.httprequest({ url: "http://maps.googleapis.com/maps/api/geocode/json?address=mannheim,opernplatz", success: function(httpresponse) { console.log(httpresponse.text); response.success(httpresponse.text); // respond contents of http response }, error: function(httpresponse) { console.error('request failed response code ' + httpresponse.status); response.error('request failed response code ' + httpresponse.status); } }); }); all calling url , logging result. url request google's geocoding api returns json object when called in browser, returns zero_results when called via cloud code. any highly appreciated!

animation - python Matplotlib gtk - animate plot with FuncAnimation -

i trying update plot within gtk window funkanimation. want click button start updating plot gets data txt file. txt-file gets updated constantly. intent plot temperature profile. here simplified code: import gtk matplotlib.backends.backend_gtkagg import figurecanvasgtkagg figurecanvas import matplotlib.animation animation matplotlib import pyplot plt class myprogram(): def __init__(self): some_gtk_stuff self.signals = { 'on_button_clicked': self.create_plot, } self.builder.connect_signals(self.signals) self.vbox = self.builder.get_object('vbox') self.figure = plt.figure() self.axis = self.figure.add_subplot(1,1,1) self.init = 0 def create_plot(self): def update_plot(i): #read sampledata txt file x = [] y = [] readfile = open('sampledata.txt', 'r') sepfile = readfile.r...

css3 - CSS color transition triggers multiple animations when loading the website -

this first question in forum if it's not explained, feel free ask me more details. i have color transition in links on navbar, triggers when hover mouse on them. work wells, problem when website loads, elements began resize or move initial positions. css nav{ height: 80px; width: 100%; background-color: rgba(250,250,250,1); font-size: 13px; border-bottom: 1px solid #d8d8d8; color: #6e6e6e; position: fixed; margin-top: -80px; } nav a{ padding: 20px 20px; line-height: 80px; -webkit-transition: 0.8s; transition: 0.8s; } nav a:hover{ color:#00bfff; } update i have tried make jsfiddle problem, when css , html same seem work correctly on demo i have changed transition property all color . has solved problem partially, since elements don't move when page loads, problem links include color transition, when website loads, show initial blue color (inexistent in css) taking transition time change correct color. in...

javascript - Why does the page shift upwards? -

do have idea why page shifts upward when click arrows (the slideshow navigators arrows) down @ bottom? it's been bugging me while now. html <div class="slideshow "> <div class="slides"> <img class ="slide active-slide" src="http://gearnuke.com/wp-content/uploads/2015/06/gta-5.jpg"> <img class ="slide" src="http://cdn.wegotthiscovered.com/wp-content/uploads/gta5.jpg"> <img class ="slide" src="http://www.igta5.com/images/official-artwork-trevor-yellow-jack-inn.jpg"> <img class ="slide" src="http://cdn2.knowyourmobile.com/sites/knowyourmobilecom/files/styles/gallery_wide/public/0/67/gtav-gta5-michael-sweatshop-1280-2277432.jpg?itok=nkehentw"> </div> <div class="dots-container"> <ul class="slider-dots"> <a href="javascript:void(0);" class="arrow-prev" ><<</a> <l...

java - How to return RSS with REST service? -

i'm using rome rss feed generating , jersey rest service. here rss feed generation. public syndfeed generate() { syndfeed feed = new syndfeedimpl(); feed.setfeedtype( "rss_2.0" ); feed.settitle( "my site" ); feed.setlink("http://example.com"); feed.setdescription("test site."); list<syndentry> entries = new arraylist<syndentry>(); syndentry entry = null; syndcontent description = null; entry = new syndentryimpl(); entry.settitle( "entry1" ); entry.setlink( "http://example.com/entry1" ); entry.setpublisheddate( new date() ); description = new syndcontentimpl(); description.settype("text/html"); description.setvalue( "this content of entry 1." ); entry.setdescription( description ); entries.add( entry ); feed.setentries(entries); return feed; } and method of getting feed @get @path("/getfeed...

php - How to setup database for iOS app? -

i'm working on making ios app user have either login og create account (and afterwards login). need somehow connect database. database of type sql , created phpmyadmin in xampp. consist of 1 table called 'user' the attributes 'id', 'email' , 'password'. i've created 2 php script called signin.php , signup.php , placed in c:\xampp\htdoc directory can load script through localhost. here script signup: <?php $email = $_get['email']; $password1 = $_get['password1']; $con=mysqli_connect("localhost","root","<mypassword>","app_db"); if (mysqli_connect_errno()) { echo "failed connect mysql: " . mysqli_connect_error(); } $sql = "insert user (email, password) values ('$email', '$password')"; if ($con->query($sql) === true) { echo "new record created successfully"; } else { echo "error: " . $sql . "<br>...

html - change color of A tag of bootsrap not working -

<head> <!-- bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> **<style> .navbar-brand{ color:red; }** </style> </head> <body> <nav class="navbar navbar-default" role="navigation"> <div class="navbar-header"> **<a class="navbar-brand" href="index.html">test</a>** </div> </nav> </div> </body> i want change color of text red, it's not working. work if put "test" in span , set style span. <style> .navbar-brand{ color:red !important; } </style> just add !important end of css color attribute. edited when !important used, associated property , value overwrite other contradicting css, wherever may be.