Posts

Showing posts from February, 2011

Ruby called a collection of blocks -

assume have built array of callable objects doing callables = [] callables << block1 callables << block2 callables << block3 callables << block4 later want call these blocks. understand can do callables.each { |block| block.call } but wondering if make simpler calling like callables.each :call i have tried code above got argumenterror. ruby support kind of syntax? you should try : callables.each &:call array#each don't accept arguments. that's why, when write callables.each :call , :call symbol passing method each argument. when prefixed :call & , each knows giving block argument, work.

some excel automation that mimics dragging corner anchor -

you know how in excel can have value row_01 , , if drag fill auto increment row number. there way through code or something? because if wanted 10,000 rows? don't want sit , drag long. ensure first cell contains 1 then... simply record macro... show how it. sub macro1() ' ' macro1 macro ' selection.autofill destination:=range("a1:a10000"), type:=xlfillseries range("a1:a1000").select end sub

Needing conformation box before delete in google sheets -

i needing conformation box appear before cells deleted. thank great help. in advance. here script function clearrange() { //replace 'sheet1' actual sheet name var sheet = spreadsheetapp.getactive().getsheetbyname('load assignment'); sheet.getrange('b7:g7').clearcontent(); } thanks script! here's documentation on how that: https://developers.google.com/apps-script/reference/base/button-set

php - Flex object not typed correctly -

i'm struggling flex class instance amfphp (v2.2) simplified code in flex: [remoteclass(alias="project")] public class project { public function project() { } } code in php: class project { var $_explicittype = "project"; public function foo() { return "bar"; } } at point, send code server: myremoteobjectservice.testmethod(myprojectinstance); which handled in php this: public function testmethod($projectinstance) { return $projectinstance->foo; } this should return 'bar' flex application instead, faultcode:channel.call.failed faultstring:'error' faultdetail:'netconnection.call.failed: http: status 500' what work is: public function testmethod() { $project = new project(); return $project->foo; } any appreciated! dany found answer: standard locat...

php - Simple Ajax filter not returning results -

i trying implement simple filter of data stored in mysql database through drop-down menu using code w3 schools website (please bear in mind new javascript!). ajax script returns no results. appreciated. ajax.html <html> <head> <script> function showuser(str) { if (str == "") { document.getelementbyid("txthint").innerhtml = ""; return; } else { if (window.xmlhttprequest) { // code ie7+, firefox, chrome, opera, safari xmlhttp = new xmlhttprequest(); } else { // code ie6, ie5 xmlhttp = new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readystate == 4 && xmlhttp.status == 200) { document.getelementbyid("txthint").innerhtml = xmlhttp.responsetext; } } xmlhttp.open("get","getuser.php?q=...

Which toolbox does randsample belong in Matlab? -

the documentation indicates randsample belongs statistics , machine learning toolbox. have earlier version of matlab not show in list of toolboxes. there way find out toolbox function belongs in current installation of matlab? you use documentation shipped version of matlab. if search function name shows toolbox belongs to. (at least version this.)

android - In the OpenRTB bid requests, is "bundle" unique to an app? -

i looking @ multple openrtb specs, example mopub. have bundle field in bid request. bundle number 123456 ios app, or package name android app package.bundle.apname. "bundle" unique app? can single app have multiple "bundle"? can single "bundle" might mean multiple apps? great questions! please see answers inline. is "bundle" unique app? --> yes, "bundle id" unique identifier single app within platform's "app store ecosystem" (ecosystem = android:google play store, ios:apple app store) for example, "bundle id" (aka 'android package name') android nytimes app on google play store 'com.nytimes.android' (listed in url). no other apps on google play store permitted use bundle id 'com.nytimes.android'. specific nytimes android app only. on ios side, "bundle id" ios nytimes app on apple app store 'id284862083' (listed in url). no other apps in app...

html - how to make one div scrollable out of 2 or more div -

i have 3 div tags , want make 1 div (of 3) scrollable i have tried overflow:"auto" in div want make scrollable , overflow:"hidden" in div tags don't want make scrollable . not working. should fix size of div following 2 div don't want make scrollable <div class="span4" style="overflow:hidden"> ... <\div> <div class="span4" style="overflow:hidden"> ... <\div> and following div want make scrollable <div class="span4" style="overflow:auto"> ... <\div> try overflow: scroll or overflow-y: scroll explicit

mysql - DISTINCT ON query w/ ORDER BY max value of a column -

i've been tasked converting rails app mysql postgres asap , ran small issue. active record query: current_user.profile_visits.limit(6).order("created_at desc").where("created_at > ? , visitor_id <> ?", 2.months.ago, current_user.id).distinct produces sql: select visitor_id, max(created_at) created_at, distinct on (visitor_id) * "profile_visits" "profile_visits"."social_user_id" = 21 , (created_at > '2015-02-01 17:17:01.826897' , visitor_id <> 21) order created_at desc, id desc limit 6 i'm pretty confident when working mysql i'm new postgres. think query failing multiple reasons. i believe distinct on needs first. i don't know how order results of max function can use max function this? the high level goal of query return 6 recent profile views of user. pointers on how fix activerecord query (or it's resulting sql) appreciated. the high level goal of query r...

php - How to bypass %23 (hash sign) through RewriteRule without data loss? -

i have following .htaccess file: rewriteengine on rewritecond %{request_uri} !^/command rewriterule .* /command/rewritehandler.php?q=%{request_uri} [b] see specs @ unanswered question https://stackoverflow.com/questions/29376788/mod-rewrite-directives-and-valid-invalid-utf-8-characters-after-first-character . if request server following /aaa%23%23aa rewritehandler.php receives /aaa . looks request_uri handles data before %23 . should type instead? capture value rewritecond , use back-reference make work: rewriteengine on rewritecond %{request_uri} (.+) rewriterule !^command/ /command/rewritehandler.php?q=%1 [nc,b,l,qsa]

opengl - GLSL vertex shader gl_Position value -

i'm creating game uses orthogonal view(2d). i'm trying understand value of gl_position in vertex shader. from understand x , y coordinates translate screen position in range of -1 1, i'm quite confused role of z , w , know w value should set 1.0 for moment use gl_position.xyw = vec3(position, 1.0); , position 2d vertex position i use opengl 3.2. remember opengl must work 3d , it's easier expose 3d details create new interface 2d. the z component set depth of vertex, points outside -1,1 (after perspective divide) not drawn , values between -1,1 checked against depth buffer see if fragment behind drawn triangle , not draw if should hidden. the w component perspective divide , allowing gpu interpolate values in perspective correct way. otherwise textures looks weird.

proc - Two Way Transpose SAS Table -

i trying create 2 way transposed table. original table have looks like id cc 1 2 1 5 1 40 2 55 2 2 2 130 2 177 3 20 3 55 3 40 4 30 4 100 i trying create table looks like cc cc1 cc2… …cc177 1 264 5 0 2 0 132 6 … … 177 2 1 692 in other words, how many id have cc1 have cc2..cc177..etc the number under id not count; id range 3 digits 5 digits id or numbers such 122345ab78 is possible have percentage display next each other? cc cc1 % cc2 %… …cc177 1 264 100% 5 1.9% 0 2 0 132 6 … … 177 2 1 692 if want change cc1 cc2 characters, how modify arrays? eventually, table looks like cc dell lenovo hp sony dell lenovo hp sony the order of names must match cc numbe...

asp.net - Fetch Weekly Data By Query in Sql Server -

i have table name 'emp_attendance_new' kept record of emp attendance.when fire query give particular result. query: select atendencedate ,emp_id,attendance_status ,empname emp_attendance_new emp_id ='20140160' , atendencedate between '3/30/2015' , '4/5/2015' result: atendencedate emp_id attendance_status empname 2015-03-30 20140160 p vikash prasad 2015-03-31 20140160 p vikash prasad 2015-04-01 20140160 p vikash prasad 2015-04-02 20140160 p vikash prasad 2015-04-03 20140160 p vikash prasad 2015-04-04 20140160 p vikash prasad but want result in single row this: emp_id empname 2015-03-30 2015-03-31 2015-04-01 2015-04-02 2014016 vikash prasad p p p p

c++ - Array Equivalent of Bare-String -

i can without issue: const char* foo = "this bare-string"; what want able same thing array: const int* bar = {1, 2, 3}; obviously code doesn't compile, there kind of array equivalent bare-string? you can't this: const int* bar = {1, 2, 3}; but can this: const int bar[] = {1, 2, 3}; reason char* in c (or c++) have added functionality, besides working char pointer, works "c string", added initialization method (special char*): const char* foo = "this bare-string"; best.

javascript - Unable to access AngularJS attribute in directive -

i'm trying implement simple directive in angularjs. in end, want able use directive this: <share-buttons url="google.com"></share-buttons> my directive looks (coffee script): module.directive 'sharebuttons', () -> controller = ['$scope', ($scope) -> $scope.share = () -> console.log $scope.url ] return { restrict: 'ea' scope: { url: '=url' } templateurl: viewpath_common('/directives/share-buttons') controller: controller } and here's template (jade): .social-icons button.btn.btn-li(ng-click="share()") i.fa.fa-linkedin.fa-fw when click button, correct function called ($scope.share), thing logged undefined . can me? its because url attribute 2 way data bound "=" so it's looking scope variable this: $scope.google.com = // should value. to passed contr...

git - SourceTree connecting to a server ip -

i need something(duh). for work have connect gitrepostery. part of public key done, things got server ip, git repostery , user name. however, can't connect repostery, stating server doesnt exit. have tried filling ip, repostery , user name, i've tried protocol stuff, doens't work , i'm desperate. can guys please me? server ip looks this: 12.34.56.789 (this isn't real one, example ofc) thanks in advance , have nice day! you should use right url, , depends on protocol using. via ssh git@ip:repo_name.git if want use ssh, need set ssh key first. via https https://ip/repo_name.git

javascript - How can I check field exist or not in mongo db before querying to mongodb? -

i have run dynamic query on collections in such way user enters collection name, field name , field value , have first of check whether field name supplied user exists in collection , if not have run query shown in example below. for example: if user enters collection name user , field name type , field value article . , based on parameters have query follows: 1) if type field exists in collection user , query be: query = user.find({type:'article'}) 2) if type not field of collection user , query be: query = user.find() i tried $exists not working me. , how can use $exists before querying? because collection, field name , field value dynamic. , how can check type field exists or not in user collection? i tried solution $exists , want know if there way it. as @philipp mentioned in comment, bound bump performance issues need perform full-collection scan without use of indexes. using $exists , query return fields equal null. suppose want first fin...

wpf - IntelliSense for Data Binding not working -

Image
after couple of hours trying debug issue data-binding caused mistyped property in binding extension. once noticed mistake, realization if intellisense available may have not made mistake in first place. visual studio user used error/warnings when mistyping name; perhaps i'm spoiled, lack of intellisense led error. i did research , found intellisense data binding available visual studio 2013 i'm using (ultimate edition). tried creating simple wpf app following second example in blog. firstly, there appears error in second example in blog resulted compiler error. prefixing type=viewmodel:mainviewmodel attribute d: fixed compiler error, yet properties of view-model class still not showing in intellisense menu. code below , in github . mainviewmodel.cs: using system.componentmodel; using system.runtime.compilerservices; namespace intellisensefordatabinding { public class mainviewmodel : inotifypropertychanged { public mainviewmodel() { ...

ios - Multiple touch events from Calabash with single request -

calabash-ios tests involving single tap have started fail, multiple taps being received 1 should happen. i'm running tests against simulator "iphone 5s (8.2 simulator)" , i've tried various calabash tapping methods, include tap_mark , touch , example: wait_tap view_selector which generates single http call (using wireshark sniff): http://localhost:37265/uia-tap but causing multiple taps in simulator, can seen simulator console log: mar 31 13:28:38 mc-x.local myapp[13790]: nsuserdefaults path = /pathtoprefs/myapp.plist mar 31 13:28:38 mc-x.local myapp[13790]: current request: { command = "uia.tapoffset('{:x 160.000000, :y 332.000000}')"; index = 0; } and these 2 lines repeated identically (same timestamp) - once, twice or 3 times more, giving repeated identical uia.tapoffset events. i'm using xcode 6.2 build 6c131e calabash 0.13.0. failures started after upgraded 0.11.4, though i've upgraded xcode 6.1.1 6.2 i'...

Does SQL Server 2012 have a function or other way to convert a varchar column that contains ASCII to plain text? -

i've inherited database table has nvarchar(max) column containing ascii numbers. need convert , replace them plain text. possible using sql function? from: 034 067 111 110 118 101 114 116 032 077 101 044 032 068 097 114 110 032 105 116 033 033 034 to: "convert me, darn it!!" thanks all test data declare @table table (ascii_col varchar(1000)) insert @table values ('034 067 111 110 118 101 114 116 032 077 101 044 032 068 097 114 110 032 105 116 033 033 034') query ;with cte as( select char(split.a.value('.', 'varchar(100)')) char_vals (select cast ('<m>' + replace(ascii_col, ' ', '</m><m>') + '</m>' xml) data @table) cross apply data.nodes ('/m') split(a) ) select (select '' + char_vals cte xml path(''),type).value('.','nvarchar(max)') result "convert ...

version control - Is there a way to format code in Eclipse's compare tool? Ignoring whitespace isn't enough -

when using compare tool, eclipse shows this void foo() { //... } as different this void foo() { //... } which while technically correct annoying when comparing 2 versions of files have different formatting. is there way apply current formatting compare view? if it's different style either of 2 things being compared @ least give nice base finding "actual" differences in code. the plugin have found this doesn't work eclipse (luna), because made older version. as aside, useful thing , perhaps easier ignore new line characters , tabs, of course show foobar and foo bar as same it's better nothing.

javascript - jQuery do code if class is changed -

i'm trying check li inside other li having class is-visible, , in case nothing, if doesn't add style width: 0px. if (jquery("li:has(li.is-visible)")){ //nothing @ moment } else { jquery('ul.cd-gallery li').css({'width' : '0px'}); } html part of code <ul class="cd-item-wrapper"> <li data-type="sve" class="is-visible"> <img class="img-reponsive" src="someimg.jpg" alt="jabuka" height="150" /> </li> <li data-type="proizvodi" class="is-hidden"> <img class="img-reponsive" src="someimg.jpg" alt="jabuka" height="150" /> </li> <li data-type="vocnaci" class="is-hidden"> <img class="img-reponsive" src="someimg.jpg" alt="jabuka" height=...

git - How to view remote changes with TortoiseGit -

i cannot figure out how view remote changes tortoisegit. someone pushed code server. see changes before git pull. how can see remote changes tortoisegit? i tried "fetch" command, when "show log" after fetching, not show remote changes. "fetch" correct command retrieve remote changes without integrating/merging them. click on "all branches" on lower left on log dialog show branches (also remote ones). or click on branch label in upper left , select branch(es) want see in log dialog.

What does !(function()) mean in JavaScript/jQuery? -

Image
this question has answer here: javascript function leading bang ! syntax 6 answers i saw in parsleyjs library folowing: what expression !(function(f){...}) mean? negation? edit: after explanations, observed code looks !( f(y){}( f(x){} ) ); or can written !( f(z) ); or !(z); where z = f(z) , z = f(y){} , , y = f(x){} ... not clear function executes expression !(z); usually use either !function(f){...}() or (function(f){...})() or +function(f){...}() the developers here combined first two, redundant.

typedef an array with const elements using const ArrayType or ConstArrayType in c++ -

i going define arrays fixed size , const elements. tried use typedef , there seems confused: typedef int a[4]; typedef const int ca[4]; const a = { 1, 2, 3, 4 }; ca ca = { 1, 2, 3, 4 }; a[0] = 0; ca[0] = 0; = ca; ca = a; all assignments cause syntax error in code above think a[0] = 0; should legal before test. considering pointers, result easier understand p[0] = 0; , cp = p; correct. typedef int *p; typedef const int *cp; const p p = new int[4]{ 1, 2, 3, 4 }; cp cp = new int[4]{ 1, 2, 3, 4 }; p[0] = 0; cp[0] = 0; p = cp; cp = p; why cv-qualifier behave different on pointer , array? because array has been const pointer, compiler makes implicit conversion? p.s. compiled code on visual studio 2013. these 2 declarations const a = { 1, 2, 3, 4 }; ca ca = { 1, 2, 3, 4 }; are equivalent , declare constant arrays. if run simple program (for example using ms vc++) #include<iostream> typedef const int ca[4]; typedef int a[4]; int main() { st...

python - create a django form object and save it -

i have signup form object i'm using create signup page. i'm trying add guest user feature app. want create user account automatically when user visits page. i'm trying create form object in backend, populate , call save method explicitly. couldn't find way populate fields backend. how can achieve this? if want create model instance (in case user ) in view data doesn't come post or data, don't use forms, rather model's api. for instance user class provides helper function (example taken documentation) : from django.contrib.auth.models import user user = user.objects.create_user('john', 'lennon@thebeatles.com', 'johnpassword') more details here : https://docs.djangoproject.com/en/1.7/topics/auth/default/#user-objects and here : https://docs.djangoproject.com/en/1.7/ref/contrib/auth/#django.contrib.auth.models.usermanager.create_user this works model class. can use create guest user dynamically if don't kn...

wordpress - Form Won't Submit With Javascript -

i trying add following code contact form 7 on wordpress: <div class="form"> <div class="f-name"> [text* your-name watermark "name *"] </div> <div class="f-email"> [email* your-email watermark "email *"] </div> <div class="f-subject"> [text your-subject watermark "phone"] </div> <div class="f-message"> [textarea* your-message watermark "message *"] </div> <div class="f-captcha"> <div class="f-captcha-insert"> [captchac captcha-886 size:l] </div> <div class="f-captcha-confirm"> [text* captchar captcha-886 size:m watermark "please enter characters above."] </div> </div> <div class="bt-contact"> <a class="btn-color btn-color-1d" href="javascript:;">[submit "send email"]</a> </div> </div> ...

angularjs - Angular-JS strict-DI doesn't like injecting resolved results from $routeProvider -

i hit problems minifying angular code turned on ng-strict-di one problem seems reside in way resolve promise on route in app.js config .when('/:userid', { templateurl: 'views/main.html', controller: 'myctrl', resolve : { mydependency : function(cache, model, $route){ return cache.getcached( $route.current.params.userid); } } }) then inject resolved promise myctrl controller angular.module('myapp') .controller('myctrl',[ 'mydependency', '$scope', '$rootscope', '$timeout', function (mydependency, $scope, $rootscope, $timeout) { etc... however error angular [error] error: [$injector:strictdi] mydependency not using explicit annotation , cannot invoked in strict mode the problem appears traceable resolve definition in app.js because can change name of 'mydependency' there in resolv...

c++ - Where is cdb.exe located in Visual Studio 2013? -

i'm trying configure debugger qt creator. however, can't find cdb.exe. internet, found out supposed located in c:\program files (x86)\windows kits\8.0\debuggers\x64\cdb.exe . yet, don't have directory c:\program files (x86)\windows kits\8.0\debuggers . have directory called c:\program files (x86)\windows kits\8.1\debuggers\x64 contains files dbghelp.dll , srcsrv.dll , symsrv.dll . cdb.exe , gui equivalent windbg.exe part of debugging tools windows , have downloaded part of windows sdk, in past has been part of ddk also. you can here: https://msdn.microsoft.com/en-us/windows/hardware/hh852365.aspx if you're interested in tools there link standalone debugging tools (as part of windows 8.1 sdk) here: https://www.microsoft.com/click/services/redirect2.ashx?cr_eac=300135395 dbghelp.dll, srcsrv.dll , symsrv.dll shipped part of windows , has been since windows 2000 (i think true of dbghelp.dll).

python - PyQt Node interface - Parrent to ItemIsMovable object -

Image
so building node based interface using pyqt project working on , having issues getting objects belong base not follow in space. when user drags base node, child objects (inputs , output boxes) follow it. have drag-able node works child objects not following properly. ideas? #!/usr/bin/python # -*- coding: utf-8 -*- """ base py file gui """ import sys pyqt4 import qtgui, qtcore array import * """ base class node. contains initialization, drawing, , containing inputs , outputs """ class node(): width = 100 height = 100 color = 1 x = 90 y = 60 inputs=[] outputs=[] def __init__(self, nwidth, nheight): self.width = nwidth self.height = nheight self.ininodedata() """ inputs , outputs created """ def ininodedata(self): j in range(5): = self x = input(this,90, 0+(j*10)) self...

javascript - How To Active Bootstrap Tab after Button Click in ASP.NET -

i working in asp.net , use twitter bootstrap plugins. in form use tab. there 2 option in tab. #1 map , #2 address . submit form , save data database when data save want saved data shown in #2 tab ( address tab ). found many article in stackoverflow related it, not achieve this. code:-asp <div class="map-panel"> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#divmap">map</a></li> <li><a data-toggle="tab" href="#divaddress">address</a></li> </ul> <div class="tab-content"> <div id="divmap" class="tab-pane fade in active"> <div id="geomap" style="width: 100%; height: 450px;"> <p...

python - How can I convert a BitString to a ctypes Byte Array? -

i've started out bitstring , ctypes, , have part of binary file stored in startdata , bitarray class. > print(startdata) 0x0000000109f0000000010605ffff now, have pass data as-is c function takes unsigned char * argument, i'm first trying this: buf = (c_ubyte * len(startdata))() to this: buf_ptr = cast(pointer(buf), pointer(c_ubyte)) this works, how assign byte data startdata array / buffer created? this doesn't work: > buf = (c_ubyte * len(startdata))(*startdata.bytes) typeerror: integer required here's possible solution (note i'm using python 3): import ctypes def bitarray_to_ctypes_byte_buffer(data): """convert bitarray instance ctypes array instance""" ba = bytearray(data.bytes) ba_len = len(ba) buffer = (ctypes.c_uint8 * ba_len).from_buffer(ba) return buffer (note: same apply converting bytes instance ctypes byte array, remove .bytes in data.bytes ). you can pass buf...

google app engine - Access AppEngine through Chinese Friewall -

This summary is not available. Please click here to view the post.

sql - Insert new row if value present in column -

i need check if column value exists record, , if insert duplicate of record, 1 of fields updated. the fields inccodes table are chars: incomecode, description, location, costcentre, newincomecode i have sql command updates of incomecodes newincomecode , clears newincomecode column present: update inccodes set incomecode = newincomecode ,newincomecode = '' newincomecode <> '' , location = location1 however need command same thing except instead of updating incomecode field, creates duplicate record incomecode updated newincomecode field. pseudo sql: insert inccodes values (select newincomecode ,description ,location ,costcentre ,null inccodes newincomecode <> '') any advice appreciated. can see similar questions insert based on criteria nothing need. thanks in advance. insert ignore inccodes (incomecode, description, location, costcentre, new...

How to call java script functions in objective C in cocos2d JS -

how call java script functions in objective c in cocos2d js. i found js objective c here . now trying js objective c calling. can 1 me. here official document. if want call more static method, may write js-binding codes,there many samples in cocos2dx-js source code.

c - Calculate execution time of all the function -

this project has many functions of them takes lot of time execute. now task find functions tasks of time. here steps: write macro calculate execution time #ifndef _calculate_exe_time_ #define _calculate_exe_time_ #include <time.h> #include <stdio.h> #define calculate_exe_time static clock_t cet_start_time, cet_end_time; \ static float cet_expend_time, cet_total_expend_time; \ static unsigned int cet_invoked_times = 0; \ cet_start_time = clock(); \ #define cet_before_return cet_end_time = clock(); \ cet_expend_time = (float)(cet_end_time - cet_start_time) / clocks_per_sec; \ cet_total_expend_time += cet_expend_time; \ printf("===%s:%s() invoked_times=%u expend_time=%.4fs total_expend_time=%.4fs\n", \ __file__, __function__, ++cet_invoked_times, cet_expend_time, cet_total_expend_time); #endif // _calculate_exe_time_ 2.put macros functions stati...

html - How to remove unknown white border of asp:image inside panel -

i have white border of asp:image control , want remove can't find problem is here html , css: <asp:panel runat="server" cssclass="nav" id="nav"> <asp:image runat="server" id="logo" cssclass="logo" /> <asp:linkbutton runat="server" id="lb1" cssclass="navbuttons">home</asp:linkbutton> <asp:linkbutton runat="server" id="linkbutton1" cssclass="navbuttons">restorant</asp:linkbutton> <asp:linkbutton runat="server" id="linkbutton2" cssclass="navbuttons">rooms</asp:linkbutton> <asp:linkbutton runat="server" id="linkbutton3" cssclass="navbuttons">spa</asp:linkbutton> <asp:linkbutton runat="server" id="linkbutton4" cssclass="navbuttons">contact</asp:linkbutton> <...

php - Presta Module not visible/installed -

i installed auction module http://addons.prestashop.com/en/marketplace-prestashop-modules/7197-auction-product.html . then uninstalled it, made changes, , tried reinstall. not shown in modules listung, although presta said module installed. files present @ /modules/auction, in ps_modules table can't find it. then tried reinstall original version - without changes - same result. module seems uploaded, not installed. how solve this? using presta shop version 1.5 what if u open ftp public_html/modules/ , manual delete it? after upload correct version , try install/uninstal/reset. helps me.

How to fetch tweet video & more than 100 tweets using Twitter Search API -

i using https://api.twitter.com/1.1/search/tweets.json?q= ' . $_post['keyword'] . ' tweets of searched keyword. i able till 100 tweets need display full 3,200 tweets. how can this? how video tweets? for videos, twitter still working on , time being video results not coming in "search api". can track here(see @ few last comments): https://twittercommunity.com/t/twitter-video-support-in-rest-and-streaming-api/31258/38 for more 100 tweets, can call api next tweets per below: find the highest id( data[data.length - 1].id ) in twitter results retrieved query perform same query "since_id" option set id found. ex: https://api.twitter.com/1.1/search/tweets.json?q=nature&since_id=602821207268921300

How to fill tables in PDF forms with iTextSharp? -

Image
all i must fill this pdf form using itextsharp . i have no problems header fields, don't know how fill table in bottom. can fill first row pdfstamper.acrofields.setfield() , how can add more rows, if @ possible? your form form based on acroform technology. means form static. every field in form corresponds widget annotation absolute position defined on page. can not add data on coordinates not predefined, hence can not "add more rows". asking impossible. take under hood of pdf: there's array of /fields , each field defined dictionary combines field entries , entries of single widget annotation. each widget annotation has fixed coordinates on page. it seems looking dynamic form solution. in case, need form based on xml forms architecture (xfa). form not xfa form. if in doubt difference between acroform , xfa technology, please download free ebook: the best itext questions on stackoverflow . in book you'll find answer several questions s...

Python 3 - using multiple times choice -

how use 'choice' multiple times in single command line. want use command 'choice' following - >>> l ['9', '10', '1', '2', '3'] >>> choice(l) '2' >>> choice(l)*3 '222' i need generate 3 different values l , not 3 times same number. if values can same run random.choice() 3 times (in loop, example). but if need different , use random.sample() instead , have pick 3 values that different you: random.sample(l, 3) using random.choice() repeatedly can lead values being picked more once, random.sample() ensure 3 values picked unique.

Android WifiManager and Scanning Battery Performance -

to understanding, 1 can request wifimanager start ap scan, great , scan results back, question regarding continuous wifi scan happens under hood. aside unregistering wifi listener scan callback, disabling wifi way stop hardware scanning? if device connected wifi bssid/ssid it's scanning? (yes http://www.androidauthority.com/community/threads/how-to-get-wifi-to-stop-scanning-after-connected.7760/ ) if request scan while connected wifi, starts scan since there's no way stop scanning without turning off hardware... @ point lose connectivity wifi network, not acceptable. seems oversight google. why didn't leave hardware alone rather make scan?! unless provoked start scanning, connect, disconnect, or stop scanning, not on own... why didn't implement way? concern battery drainage continuous scanning... whether or not have listener irrelevant. fact hardware querying nearby networks sounds pretty resource , battery intensive. is there 1 can in case without rooting? ...

android - Google play error on tablet, your device not compatible with this version -

Image
on tablet, application in google play store shows error, device not compatible version. after research, found include elements in manifest. <supports-screens android:largescreens="true" /> <supports-screens android:xlargescreens="true" /> is necessary include these elements in manifest? my application working working fine when manually install .apk, have optimized ui different screen sizes, problem when try download application through google play store google play store shows error, device not compatible version. it not necessary,i have app on play store check link .i haven't included these lines still app works in tablets.but ofcourse have made folders , values every support screens image.check image below.

python - Bitnami Django Stack and module "requests": cannot import name 'certs' -

very specific stuff. i'm running bitnami django stack cloud vm on amazon. on 2 different "regular" machines, install requests running sudo pip install requests , seems bitname uses it's own specific structure, , going wrong when installing requests way. can related issue #2028 , fixed long time ago. i have following traceback: environment: request method: request url: http://54.94.226.137/ django version: 1.7.7 python version: 2.7.6 installed applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites', 'vz_base', 'vz_api', 'vz_admin', 'vz_user') installed middleware: ('django.contrib.sessions.middleware.sessionmiddleware', 'django.middleware.common.commonmiddleware', 'django.middleware.csrf.csrfviewm...

javascript - Are IceCandidate and SDP static? -

are icecandidate , sdp fixed values? idea store them in server database instead of retrieving on every connection? if updating these data unavoidable, when should it? no not fixed values. ice candidates locate user in network topology reside in at present , unless have static ip (which nobody has) , wired internet connection , static lan address, , desktop computer connects solely through these means , never through, say, wifi, change hourly, daily or weekly. sdp additionally contains media-setup call , other information, can change call call, , mid-call (requiring re-negotiation) if video or audio sources added, removed or altered during call. sdp may additionally contain other things expire, enough dissuade you.

json - Set request headers for Rspec and Rack::Test in Ruby on Rails -

i'm trying test login , logout json endpoints application using rspec. using devise , devise_token_auth gems in order build json endpoints authentication. i can log user in, when logging out there needs several request headers present logout function find correct user , complete. i've tried add headers current rack session, seems drop them when request created . here code far... helper method ( spec/support/api_helper.rb ): def login_user user = create(:user) post '/api/v1/auth/sign_in', email: user.email, password: user.password, format: :json return { 'token-type' => 'bearer', 'uid' => last_response.headers['uid'], 'access-token' => last_response.headers['access-token'], 'client' => last_response.headers['client'], 'expiry' => last_response.headers['expiry...

selenium - Is it possible to verify toast in appium, using selendroid mode? -

is possible verify toast in appium, using selendroid mode? if does, can explain how it's done? you can using following code: selendroiddriver.findelementbyid("showtoastbutton").click(); // button shows toast upon clicking webelement toast = testwaiter.waitforelement(by.linktext("hello selendroid toast!"), 3, selendroiddriver); assert.assertnotnull(toast);

c# - How to layer one window on top of another with transparency(Overlay) or how to do aplha-blending on two windows using directx? -

i trying achieve alpha blending of 2 windows have 1 window contains image , window contains webpage. want alpha blend these 2 windows gives overlay effect , want top window transparent window underneath seen. later want save in video(preferably using direct x). have read several tutorials on internet regarding direct x alpha blending have not been able find want achieve. example/source code achieve or pointer towards right direction appreciated. finally found answer myself. further research lead me this,this thread looking for. might useful else , might save lot of head banging on research.

python 2.7 - pandas DataFrame metadata and set_index -

after several hours of writing nice metadata handler pandas dataframe, this: >>> import pandas pd >>> = pd.dataframe({'frame':[0,1,2,3,4,5,6,7], 'x':[1,2,2,2,3,4,2,11], 'y':[2,2,3,2,2,3,2,10]}) >>> frame x y 0 0 1 2 1 1 2 2 2 2 2 3 3 3 2 2 4 4 3 2 5 5 4 3 6 6 2 2 7 7 11 10 >>> a.set_index('frame') x y frame 0 1 2 1 2 2 2 2 3 3 2 2 4 3 2 5 4 3 6 2 2 7 11 10 >>> type(a._metadata) list >>> a._metadata.append(dict()) >>> a.set_index('frame') --------------------------------------------------------------------------- typeerror traceback (most recent call last) <ipython-input-11-a271477b5f41> in <module>() ----> 1 a.set_index('frame') /usr/lib/python2.7/dist-packages/pand...

angularjs - Angular filter to add " before and after variable content -

i have following html / angular code: <blockquote> {{testimonial.text}} </blockquote> how can create filter, named blockquote, add " before , after {{testimonial.text}}? something like: {{testimonial.text | blockquote}} would render as: "testimonial text content" in opposing current code renders: testimonial text content just create filter adds " on start , end of input: .filter('blockquote', function() { return function(value) { return '"' + value + '"'; } })

.htaccess - 301 Redirect to replace all spaces to hyphens -

so here's problem. took on site has has bunch of pages indexed have %20 indexed in google. because person decided use tag name title , url slug. so, urls this: http://www.test.com/tag/bob%20hope http://www.test.com/tag/bob%20hope%20is%20funny i have added new field url slug , string replaced spaces dashes. while have no problem linking these new pages , getting data, need 301 redirect old urls new urls, like: http://www.test.com/tag/bob-hope http://www.test.com/tag/bob-hope-is-funny so, needs able account multiple spaces. questions? :) use these rules in .htaccess file: options +followsymlinks -multiviews rewriteengine on rewritebase / # keep replacing space hyphen until there no space use internal rewrite rewriterule ^([^\s%20]*)[\s%20]+(.*)$ $1-$2 [e=nospace:1] # when there no space make external redirection rewritecond %{env:nospace} =1 rewriterule ^([^\s%20]+)$ $1 [r=301,l] this replace space characters ( \s or %20 ) hyphen - so uri of /tag/bo...

neoscms - Neos 1.2.3 won't find /setup after installation -

i try install typo3 neos 1.2.3. if downloaded , set file permissions. after accessing via browser http://localhost/ information, database connection not working should go setup. after click on link receive 404 error, setup not found. has idea? http://localhost/index.php/setup show typo3 neos page not found message. thanks! i had same problem when trying install neos aimeos web shop package ( http://aimeos.org ) the problem mod_rewrite wasn't set up. solve had perform tasks (ubuntu 14.04 in case): sudo a2enmod rewrite this enables mod_rewrite first. have adapt vhost configuration. default vhost config located in /etc/apache2/sites-enabled/000-default.conf (in fedora or other linux distributions directory might named /etc/httpd/...). in file, change documentroot neos ./web/ directory, e.g. documentroot /var/www/neos/web furthermore, need add "directory" directive below "documentroot" line allow .htaccess files add rewrite rules: <di...

c# .net grid app search page -

trying use guide https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868180.aspx my app contains personal trainers, , personal trainers have customers. want able search customers. this how far am: can search customers on first/lastname , how many results there are, ie results(3), not show them. i've included data: using personaltrainergridapp.data; the if statement in navigationhelper_loadstate confusing me, i'm not sure have in it, , i'm not sure if filter_checked correct. anyone have pointers? formatting! private async void navigationhelper_loadstate(object sender, loadstateeventargs e) { var querytext = e.navigationparameter string; // initialize results list. allresultscollection = new dictionary<string, ienumerable<sampledatasource>>(); // keep track of number of matching items. var totalmatchingitems = 0; var filterlist = new list<filter>(); var groups = await...

java - Spring : Schedule a task which takes a parameter -

i have class following function: public class classa{ ... ... void function_to_be_scheduled(string param){ ... ... } } i want schedule function using scheduled-tasks element of task namespace. <task:scheduled-tasks> <task:scheduled ref="beana" method="function_to_be_scheduled" cron="${cron}"/> </task:scheduled-tasks> how pass parameter function want schedule? according docs cant. notice methods scheduled must have void returns , must not expect arguments.

javascript - Best way to show a full screen Ajax loader -

i'm using set of templates develop site has search page . the template comes loading page i'd show when i'm performing ajax update of search results. all ajax fetch , display of results working. need know of technique display loading html whilst it's fetching new results. the technologies i'm using html, jquery, asp.net, mvc. regards, matt include page in search page, , hide it you can use jquery check if ajax call working, , while can fade in loading page, , fade out if it's done loading. http://api.jquery.com/fadein/ http://api.jquery.com/fadeout/

python - Installed packages with pip are not shown in pip freeze? -

i'm using virtualenv , pip on debian wheezy. i'm having odd problem packages appear install ok, aren't visible in virtualenv. this requirements.txt file: django==1.7.7 psycopg2==2.5.4 django-geojson==2.6.0 if install pip inside virtualenv, says has been installed: (.venv)$ sudo pip install -r requirements.txt requirement satisfied (use --upgrade upgrade): django==1.7.7 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 1)) requirement satisfied (use --upgrade upgrade): psycopg2==2.5.4 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 2)) requirement satisfied (use --upgrade upgrade): django-geojson==2.6.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements/base.txt (line 3)) requirement satisfied (use --upgrade upgrade): 6 in /usr/local/lib/python2.7/dist-packages (from django-geojson==2.6.0->-r requirements/base.txt (line 3)) cleaning up... but if pip freeze check installed, looks pi...

R: Find position of first value greater than X in a vector -

in r: have vector , want find position of first value greater 100. # randomly generate suitable vector set.seed(0) v <- sample(50:150, size = 50, replace = true) min(which(v > 100))

java - Initialize Spring batch DB before application bean is created -

i'm trying create bean so: @bean public clock clock(jobexplorer explorer, environment environment) { // check last run time of job , create clock bean } but when application starts up, error: ora-00942: table or view not exist because spring batch schema hasn't been created spring boot's batchautoconfiguration yet. then, tried this: @bean @conditiononbean(batchdatabaseinitializer.class) public clock clock(jobexplorer explorer, environment environment) { // check last run time of job , create clock bean } this shifted error when clock bean created when bean requiring clock created: @bean(name = "reader") public itemreader<record> itemreader( jdbctemplate jdbctemplate, clock clock) { // create item reader } error: no qualifying bean of type [java.time.clock] found dependency this keeps cascading. if put @conditionalonbean on itemreader method, when bean requires itemreader created, same "no qualifying...