Posts

Showing posts from June, 2012

eclipse - How to specify/change git merge strategy in E Git plugin -

we want change default merge strategy provided e git.from git scm reference specified merge strategy can given -x. can done eclipse well?? thanks in advance. it's not possible. egit has extension point provide different merge strategies (than default 1 given jgit implementation), extension point merely meant provide higher level semantic aware merge implementations, e.g. merging uml diagrams in papyrus plugins. you can change default of merge tool content (last head, workspace pre-merged, or prompt) in git workspace preferences.

javascript - Meteor: How can I get useraccounts package to write a new user doc into a remote collection? -

i'm using packages accounts-password , useraccounts:bootstrap , works fine, meaning sign-on form creates new doc in meteor.users collection. don't want collection on client facing app, hence have second app running connect via ddp.connect() , can exchange necessary docs/collections via pub/sub , calling methods on remote app. the thing doesn't work useraccount doc. i've used (on client app): remote.subscribe('users', meteor.userid(), function() { }); and (on remote app): meteor.publish('users', function() { return meteor.users.find({}); }); even though i'm not sure if there pub/sub included in package. still, doc written local (client) app , not remote app. how can achieve this? useraccounts:core makes use of accounts.createuser on server side (see this line ) within method called client-side (see this line ). new user object created server side , not client (though flows way down client ddp , default users subscripti...

Access the only span inside an element using JQuery -

this might sound question asked before isn't. know how access elements using jquery in situation, parent element has colon in name making difficult. structure follows: <fb:comments class='fb_iframe_widget'> <span>something</span> </fb:comments> note span need access doesn't have id or class , when use regular jquery construct throws error due colon: var fbspan = $('fb:comments span'); if colons not allowed in tag names, how facebook in first place? more importantly, how access span inside <fb:comments> ? you can using class if solves problem, like $(".fb_iframe_widget").find("span"); or $(".fb_iframe_widget span");

php - Symfony overwrite controller and action -

i use hwio bundle , after custom service throws in connectcontroller in public function connectserviceaction(request $request, $service) in action throws me hwio template, know how reload template don't need template need stay rout: example have route "home_page" after social connect want still rout "home_page" this service: class userprovider implements oauthawareuserproviderinterface { protected $grabproject; public function __construct(ggrabgithubproject $grabproject) { $this->grabproject = $grabproject; } /** * {@inheritdoc} */ public function connect(userinterface $user, userresponseinterface $response) { $service = $response->getresourceowner()->getname(); $serviceprovider = $service."provider"; $user = $this->$serviceprovider->setuserdata($user, $response); $grabproject = $this->grabproject->grabproject($response->getaccesstoken(), $...

wordpress - PHP scandir - multiple directories -

i creating wordpress plugin allows user apply sorting rules particular template (page, archive, single etc). populating list of pages using php scandir so: $files = scandir(get_template_directory()); the problem keep single.php templates in '/single' subfolder these templates not being called above function. how can use multiple directories within scandir function (perhaps array?) or need different solution? so trying to: $files = scandir( get_template_directory() , get_template_directory().'/single' ); my current solution (not elegant requires 2 each loops): function query_caller_is_template_file_get_template_files() { $template_files_list = array(); $files = scandir(get_template_directory()); $singlefiles = scandir(get_template_directory().'/single'); foreach($files $file) { if(strpos($fil...

azure - VS2015 NuGet Cannot Install Microsoft.WindowsAzure.ConfigurationManager or ServiceBus -

i cant install nuget packages in windows universal app. i thought might because configuration manager not compatible windows universal apps, have same problem servicebus package. when try install through nuget manager says package restore failed. rolling package changes 'app1'. so tried install configuration manager through package manager console , error shown below. have tried deleting .suo file , restart vs. have tried uninstalling nuget package manager, restarting, reinstall , restart. i have installed windowsazure.storage , windowsazure.mobileservices without issue. pm> install-package microsoft.windowsazure.configurationmanager restoring packages 'app1'. restoring packages c:\users\diarmaid\documents\visual studio 2015\projects\app1\app1\project.json... install-package : microsoft.windowsazure.configurationmanager 3.2.1 not compatible uap,version=v10.0. @ line:1 char:1 + install-package microsoft.windowsazure.configurationmanager + ~~~~~~~...

php - Sort pagniation by relationship count -

i want sort question amount of answers (one many relationship). orderby works columns, in case need sort value. select answers.question_id, count(*) counter answers, questions answers.id = questions.id question.year > 2014 group answers.question_id order `counter` desc how can use laravel's pagnation here? $questions->where('year', '>', 2014) ->paginate(10) will pagnation, not sorting results. sortby no solution, because need results, sorting them , picking 10. it's huge time waste. you can make use of power of collections ! assusming have correctly set models. $questions = question::with('answers')->get()->sortby(function($question) { return $question->answers->count(); }); will return collection of questions sorted number of answers. can manually build paginator object (since paginate method can used on eloquent objects) : $questions = new illuminate\pagination\paginator($questions, ...

c++ - Coordinates of a pixel between two images -

i looking solution compute pixel coordinate 2 images. question: if take following code, how compute pixel coordinate changed "qvector difference" ? possible have (x,y) coordinate , find on currentimage pixel represents ? char *previousimage; char *currentimage; qvector difference<long>; for(int = 0 ; < currentimagesize; i++) { //check if pixels same (we can rgb values, example) if(previousimagepixel != currentimagepixel) { difference.push_back(currentimage - previousimage); } currentimage++; } edit: more information topic: the image in rgb format the width, height , bpp of both images known i have pointer bytes representing image the main objective here know new value of pixel changed between 2 images , know pixel (its coordinates) there not enough information answer, try give idea. you have declared char *previousimage; , implies me have pointer bytes representing image. need more interpret image. you n...

Access elements of returned array in Fortran -

how 1 access element of array returned function? example, shape() returns array of integers. how 1 compare element of array integer? following not compile: integer :: integer, dimension(5) :: b = 5 if (a .eq. shape(b)) print *, 'equal' end if the error is: if (a .eq. shape(c)) 1 error: if clause @ (1) requires scalar logical expression i understand because shape(c) returns array. however, accessing element of array not appear possible so: shape(c)(1) now if add these 2 lines: integer, dimension(1) :: c c = shape(b) ...and change if clause this: if (a .eq. c(1)) ... works. have declare array variable hold return value of shape() , or there other way it? further answers deal shape , logical expressions etc, general answer question "how 1 access element of array returned function?" is you assign expression has function reference array variable, , index array variable. you use expression has function reference actual argumen...

sql - How to get values from multiple tables in php and mysql -

hi guys have 3 tables stored data , want data them written code not work please can tell me how can that? my first table "permission" permission names , id included here. create table if not exists `permission` ( `permission_id` int(11) not null, `permission_description` varchar(50) not null ) engine=innodb auto_increment=25 default charset=latin1; second table "role" included role names roles id. create table if not exists `role` ( `id` int(11) not null, `role_group` int(11) not null, `role_name` varchar(50) not null, `role_description` varchar(50) not null ) engine=innodb auto_increment=29 default charset=latin1; and third "role_permission" included permissions in "permission" table can access role in "role" table. create table if not exists `role_permission` ( `id` int(11) not null, `role_id` int(11) not null, `permission_id` int(11) not null ) engine=innodb default charset=latin1; php: $result3 = $dp->sql_quer...

php - Multiple webservers (NGINX) behind Load Balancer, share settings (database connections etc.) -

i'm designing system require several web servers (nginx) behind load balancer. my question is: techniques suggest using sharing settings among webbservers (hosting php-app)? let's have change credentials database connection. in case don't want log in every single server , change of config files. what suggest able update variables in 1 place it's accessible web servers. i've considered having small server in middle servers read (through scp-connection or such), don't want single point of failure. there various solutions automate server management puppet , chef, if getting started 2 our 3 servers, consider tool that's send broadcast same ssh session multiple hosts. terminator gnome great , there's csshx mac (which haven't tried). it's great able see both terminals @ once in case there small differences between server prior manual maintenance. in terminator, can switch between broadcasting commands group of terminals , typing sp...

.htaccess - Drupal 7 RewriteRule not working -

my basic page access i.e : mysite/aboutus, working fine. but due request, every page except home needs prefixed training. so if need go mysite/aboutus, instead need go mysite/training/aboutus. i edited every page needed rewriting mypage.tpl.php, change path troublesome. i tried edited .htaccess in project folder, below of attempts : rewriterule ^/training/about$ /about rewriterule ^(.*)/training/about$ $1/about none works. could point me right direction? cheers ! # # apache/php/drupal settings: # # protect files , directories prying eyes. <filesmatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|themes|tpl(\.php)?|xtmpl)$|^(\..*|entries.*|repository|root|tag|template)$"> order allow,deny </filesmatch> # make drupal handle 404 errors. errordocument 404 /index.php # set default handler. directoryindex index.php index.html index.htm # override php settings cannot changed @ runtime. see # sites/default/default.setting...

javascript - Wrong output to web browser -

i tryed show browser date , time, have wrong output. maybe miss can't catch is? encoding ansi . output: current date , time - it's output. code: <html> <head><title>show date‹</title></head> <body> <h1>current date , time</h1> <p> <script language="javascript"> = new date(); localtime = now.tostring(); utctime = now.togmtstring(); hours = now.gethours(); mins = now.getminutes(); secs = now.getseconds(); document.write("<b>current time: </b>" + localtime + "<br>"); document.write("<b>asolute time: </b>" + utctime + "</p>"); document.write("<font size='+5'>"); ...

How to let vim show BOM as <feff> -

when @ file on 1 of our servers see this: <feff>sku;qty productsku;1 when download file , open vi don't see <feff> when :e ++bin can see <feff> see ^m now <feff>sku;qty^m productsku;1^m but don't want set ^m . want see <feff> . example <80> had in file. how can set vim show me special chars? ~ edit ~ the command vi --version tells me following: vim - vi improved 7.0 (2006 may 7, compiled aug 4 2010 07:21:08) it says system-vimrc-file /etc/vimrc has following content: if v:lang =~ "utf8$" || v:lang =~ "utf-8$" set fileencodings=utf-8,latin1 endif set term=builtin_ansi set nocompatible " use vim defaults (much better!) set bs=indent,eol,start " allow backspacing on in insert mode "set ai " set autoindenting on "set backup " keep backup file set viminfo='20,\"50 " read/write .viminfo file, don't store more ...

ios - NSPredicate to fetch dictionary from array of arrays -

from following array want fetch dictionary message_id = 1. want indexpath of cell message_id == 1. <__nsarraym 0x17d918d0>( <__nsarraym 0x17faa070>( { chatstatus = sent; date = "feb 05, 2016"; = ""; height = "17.000000"; isoutgoing = yes; "message_id" = "1"; time = "02:39 pm"; = ""; width = "95.000000"; }, { chatstatus = sent; date = "feb 05, 2016"; = ""; height = "17.000000"; isoutgoing = yes; "message_id" = "2"; time = "02:39 pm"; = ""; width = "95.000000"; }, ) ) i think should around nsarray's method -[nsarray indexesofobjectspassingtest:^bool(id _nonnull obj, nsuinteger idx, bool * _nonnull stop)] by doing : nsmutablearray *indexpaths = [nsmutablearray array]; [myarray enumerateobjectsusingblock:^(id ...

c# - how to create tcpclient to unknown ip address -

i using array of tcpclient, have set different devices tcp server , c# gui acts client of them. know each address ip of each device in network can set each tcp client without problem. want gui can recognize server without set manually ip addresses. how can it? thought @ first local ip address of pc base network(done) , thought declare array of tcpclient try cennect possible ip address need lot of time. public void getlocalipaddress() // local ip of pc { ipaddress ip = dns.gethostaddresses(dns.gethostname()).where(address => address.addressfamily == addressfamily.internetwork).first(); textbox2.text = ip.tostring(); string aux = ip.tostring(); int num = aux.indexof("."); byte0 = aux.substring(0,num); aux = aux.substring(num + 1); num = aux.indexof("."); byte1 = aux.substring(0, num); aux = aux.substring(num + 1); num = aux.indexof("."); byte2 = aux.substring(0, num); aux = aux.substring(num + 1); ...

mongodb - Mongo can't connect -

i'm running ubuntu 15 on azure vps. installed mongodb , got , running fine. then, stopped mongod service , changed db path , log path in mongod.conf point directories i've created on attached disk: # , how store data. storage: dbpath: /datadrive/lib/mongodb journal: enabled: true # engine: # mmapv1: # wiredtiger: # write logging data. systemlog: destination: file logappend: true path: /datadrive/log/mongodb/mongod.log i restarted entire vps make double sure new changes take effect. when type mongo following error: 2016-02-05t14:49:41.004+0000 w network [thread1] failed connect 127.0.0.1:27017, reason: errno:111 connection refused 2016-02-05t14:49:41.018+0000 e query [thread1] error: couldn't connect server 127.0.0.1:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:224:14 @(connect):1:6 if reverse changes , use original log , lib locations, works. can make sure new locations used? edit after keeping old log locati...

f# - Does using the same instance of a builder class concurrently cause any side effects? -

i want use computation expressions inside implementation of f# class intended c# consumption. interop class singleton (one instance wired in container) , used across threads (web requests). the builder consists of methods , has no backing fields or state. given following customary in f#: module = let private build = new somebuilder() does mean multiple expressions associated 1 builder can evaluated concurrently no problems? under hood, builder doesn't "work" @ all. compiler converts computation expression series of method calls on builder, , compiles that. therefore, thread-safety of builder wholly dependent on thread-safety of methods - i.e. methods write. for example, following code: mybuilder { let! x = f() let! y = g(x) return x + y } would converted following: mybuilder.bind( f(), fun x -> mybuilder.bind( g(x), fun y -> mybuilder.return( x + y ) ) ) (note: above code may not exact, conveys gist)

r - Performance of a loop for modifiying a factor -

so have following loop: for(i in 1:dim(d)[1]) { if(d$countryname[i] %in% c("italy","spain","canada","brazil","united states","france","mexico","colombia","peru","chile","argentina","ecuador")) {next} else {d$countryname[i] <- "others"} } the "d" dataframe has more 6,5 million rows , d$countryname factor. is there way make faster? very slow. thank you. how about: log <- d$countryname %in% c("italy","spain","canada","brazil","united states","france","mexico","colombia","peru","chile","argentina","ecuador") d$countryname[!log] <- "others"

ios - Parse migration heroku -

guys need parse migration. parse created in heroku , i'm trying call parse via rest request class xx failed error: error domain=com.alamofire.networking.error code=-1011 "expected status code in (200-299), got 403" userinfo={nslocalizeddescription=expected status code in (200-299), got 403, nserrorfailingurlkey= https://sheltered- **et-*****.herokuapp.com/parse/classes/xx} something credentials? i tried several configurations without luck index.js var api = new parseserver({ databaseuri: databaseuri || 'mongodb://localhost:27017/dev', cloud: process.env.cloud_code_main || __dirname + '/cloud/main.js', appid: '123456789', clientkey:'123456789', masterkey: '123456789' }); ios: //static nsstring * const ksdfparseapibaseurlstring = @"https://api.parse.com/1/"; static nsstring * const ksdfparseapibaseurlstring = @"https://sheltered-hamlet-****.herokuapp.com/parse/"; sta...

c# - DotPeek Decompile .dll File -

when decompile x.dll file can't rebuild , receive following errors severity code description project file line suppression state error cs1001 identifier expected library c:\users\ ...\managers\rpchubmanager.cs 52 active why dotpeek create strange code ,"o__sitecontainer6.<>p__site7 " ,and mean ??,how can solve problem ??, in advance private void ontimerelapsed(object sender) { system.threading.threadpool.queueuserworkitem(delegate(object n) { foreach (system.collections.generic.keyvaluepair<sessionmanager, string> current in rpchubmanager.dashboard_connections) { system.collections.generic.list<symbolminimizeddto> updatedsymbolsprices = this.trader_manager.getupdatedsymbolsprices(current.key, false); if (rpchubmanager.<ontimerelapsed>o__sitecontainer6.<>p__site7 == null) { ...

html - Text not in element -

Image
i'm making slider bootstrap slider, , when try add text on controllers, text display's on left, when elements on center. live demo: http://povilasc.lt/shop/ background changed see text (1 , 2) html: .carousel-indicators { text-align: center; } .carousel-indicators li { width: 20px; display: inline-block; height: 20px; line-height: 20px; font-size: 12px; padding: 0; margin: 2px; color: #fff; border: 0; border-radius: 0; background-color: #222; text-align: center; } <ol class="carousel-indicators"> <li data-target="#carousel-2" data-slide-to="0" class="active">1</li> <li data-target="#carousel-2" data-slide-to="1">2</li> </ol> in safari build in element inspector shows me, .carousel-indicators li have style "text-indent: -999px;" applied. add .carousel-indicators li ...

user interface - Starting a Windows Process or Service with a GUI with PowerShell DSC -

i have unity3d application (a simple .exe) i'm trying automate powershell dsc. however, seems unity3d cannot acquire gpu when started service or background process, breaks application. when started manually via double-clicking .exe, things work fine. is there way force dsc show gui when starting service or process? thanks! dsc doesn't support interactive applications during configuration. can think of 2 solutions: ensure user logging on the user logs on whatever reason setup user auto-logon during config (and sure set dsc reboot.) auto logon setup kb ensure app runs when user logs on: setup scheduled task start app when user logs on schedule task cmdlet reference atlogon trigger reference the app set in registry run when user logs on

c# - SqlWorkflowInstanceStore WaitForEvents returns HasRunnableWorkflowEvent but LoadRunnableInstance fails -

dears please me restoring delayed (and persisted) workflows. i'm trying check on self-hosted workflow store there instance delayed , can resumed. testing purposes i've created dummy activity delayed , persists on delay. generally resume process looks like: get wf definition configure sql instance store call waitforevents there event hasrunnableworkflowevent.value name , if create workflowapplication object , execute loadrunnableinstance method it works fine if store created|initialized , waitforevents called, store closed. in such case store reads available workflows persisted db , throws timeout exception if there no workflows available resume. the problem happens if store created , loop started waitforevents (the same thing happens beginwaitforevents ). in such case reads available workflows db (with proper ids) instead of timeout exception going read 1 more instance (i know how many workflows there ready resumed because using separate test database )...

utf 8 - how to concat two strings in php which are in persian -

the question have string of: $content=$rows["content"]; which retrieved data base.the sting in persian. want show 150 character.so used: $content=substr($content,0,150); and show still continues need show 3 dots: "..." did: $content.='...'; and when show string echo, 3 dots added appear @ right of last line. persian right left, 3 dots needs appear in left of last line. i tired 1 two, 1 didn't worked too $content =iconv(mb_detect_encoding($content, mb_detect_order(), true), "utf-8", $content); $content=substr($content,0,150); $dot='...'; $dot =iconv(mb_detect_encoding($dot, mb_detect_order(), true), "utf-8", $dot); $content.=$dot; i added p tag rtl around texts wanted shown way. this: <p dir="rtl">'; echo $content; echo "..."; echo '</p>';

scala - Adding an Array to ConcurrentLinkedQueue -

i trying add array concurrentlinkedqueue (collecteddata) in scala 2.11: stream.foreachrdd { rdd => collections.addall(collecteddata, rdd.collect()) } i got following compilation error: [error] found : java.util.concurrent.concurrentlinkedqueue[(string, string)] [error] required: java.util.collection[_ >: java.io.serializable] [error] note: (string, string) <: any, java-defined trait collection invariant in type e. [error] may wish investigate wildcard type such `_ <: any`. (sls 3.2.10) [error] stream.foreachrdd { rdd => collections.addall(allreceived, rdd.collect()) } can give me hint these errors mean? what type of stream? the error message tells you, have collection tuples of strings. need collection, can insert instances of serializable. means somewhere type inferred did not intend. did explicitly declare type of stream? if not, try doing , type error somewhere, real problem is.

I have graph.db folder from neo4j. It contains lot of neostore*.* files. How do i export a csv file from this? -

Image
i have graph.db folder neo4j. contains lot of neostore*.* files. how export csv file ? note: have graph.db sent friend. download , install neo4j if haven't already move graph.db directory have data/ directory of fresh neo4j installation, replacing existing graph.db directory in fresh neo4j instance. (note: if using desktop neo4j application can choose location of existing graph.db directory when starting neo4j). start neo4j server to generate csvs have few options: export neo4j browser neo4j running, open web browser , navigate http://localhost:7474 . execute cypher query. click on "download" icon , choose "export csv" download csv representation of data returned. see screenshot below. neo4j-shell-tools use neo4j-shell-tools export results of cypher query. use -o file.csv specify output should written csv file. see this blog post more info.

asp.net mvc - Pass multiple JSON objects to MVC5 action method -

i want pass parameters array , string don't send string parameter control action. use code: public virtual async task<actionresult> create(addcategorymodel viewmodel, string id) {} i use code json don't pass id action: <script> $(document).ready(function(){ $(".btn-success").click(function(e) { var formdata = json.stringify($("#ajaxform").serializearray()); alert(formdata); var myform = $("#ajaxform").serializejson(); console.log(myform); $.ajax( { url : "/category/create/", //,+ //$(foo).val(), //url: "url.action("category", "create", new { id = "oo" })", //id: $(foo).attr('value') , type: "post", data : {valarray:formdata,...

win universal app - Testing UWP app using random events -

for test android application can use command line tool monkey . long time ago, used hopper check app stability on windows mobile. and universal windows platform (uwp) apps? there tool generate ramdom events test application? i'm not talking achieve using coded ui test builder .

php - admin-sdk: users/list works, but members/list doesn't? -

within company's domain, i'm able search users via call: https://developers.google.com/admin-sdk/directory/v1/reference/users/list (domain: mydomain.com, viewtype: domain_public, , own email sub= in service account authorization.) i've confirmed web browser, in company can view membership of group in company going https://groups.google.com/a/mycompany/forum/#!members/mygroup . it seems follow (same api, open company-wide) should able obtain group members via call: https://developers.google.com/admin-sdk/directory/v1/reference/members/list however, using api explorer, i'm getting: 403 ok - show headers - { "error": { "errors": [ { "domain": "global", "reason": "forbidden", "message": "not authorized access resource/api" } ], "code": 403, "message": "not authorized access resource/api" } } this doesn't seem make sense...

arrays - Segmentation fault in c dealing with scanf -

i'm writing program requires me union of 2 arrays. here code far. segmentation fault error after enter set a. #include <stdio.h> void union(int a[], int b[], int set1, int set2) { int u[20], i, j, unionindex=0,trigger; for(i=0; i<set1; i++) { u[unionindex] = a[i]; unionindex++; } for(i=0; i<set2; i++) { trigger=0; for(j =0; j<set1; j++) { if(b[i] == u[j]) { trigger =1; break; } } if(trigger =0) { u[unionindex]=b[i]; unionindex++; } } for(i=0;i<unionindex;unionindex++) { printf(" %d",u[i]); } } int main(void) { int n=0; int m=0; int i; int j; printf("please enter number of elements in set a: "); scanf("%d",n ); int a[n]; printf("enter numbers in set: "); for(i=0;i<n;i++) { scanf("%d",&a[i]); } printf("please enter...

python - Why does Pandas coerce my numpy float32 to float64? -

why pandas coerce numpy float32 float64 in piece of code: >>> import pandas pd >>> import numpy np >>> df = pd.dataframe([[1, 2, 'a'], [3, 4, 'b']], dtype=np.float32) >>> = df.ix[:, 0:1].values >>> df.ix[:, 0:1] = >>> df[0].dtype dtype('float64') the behavior seems odd me wonder if bug. on pandas version 0.17.1 (updated pypi version) , note there has been coercing bugs addressed, see https://github.com/pydata/pandas/issues/11847 . haven't tried piece of code updated github master. is bug or misunderstand "feature" in pandas? if feature, how around it? (the coercing problem relates question asked performance of pandas assignments: assignment of pandas dataframe float32 , float64 slow ) i think worth posting github issue. behavior inconsistent. the code takes different branch based on whether dataframe mixed-type or not ( source ). in mixed-type case ndarray converted py...

navbar - Continuously populate twitter-bootstrap navigation menu as the width increases. -

i using default twitter bootstrap responsive navbar (working mobile up). want menu continually populated width of navbar expands. my current navigation (perfect mobile) [ menu item 1 | menu item 2 | menu item 3 | items ] however width expands populate list more menu items. [ menu item 1 | menu item 2 | menu item 3 | menu item 4 | items ] bootstrap has 'hidden' class hide elements based on size, suffixed on end of class. bootstrap gives these classes trigger @ breakpoints: hidden-xs, hidden-sm, hidden-md, hidden-lg. so in scenario, this: <ul> <li>menu item 1</li> <li>menu item 2</li> <li>menu item 3</li> <li>menu item 4</li> <li class="hidden-xs hidden-sm">item 5</li> <li class="hidden-xs hidden-sm hidden-md">item 6</li> <ul> basically, these classes mean element hidden until falls breakpoint range outside of ones hidden cla...

.htaccess - Redirect http to https single link -

i want redirect http://advokatami.bg/wp-content/uploads/2014/napred.png https://advokatami.bg/wp-content/uploads/2014/napred.png i using http:// ver in wufoo site ssl, have mixed content on image , don't want replace link in 100 wufoo forms. there way .htaccess? no it's not possible: when browser request it's late, if server answer redirect. as temporary solution can use https://www.w3.org/tr/upgrade-insecure-requests/

azure - Authenticate Amazon S3 bucket with C# using AWSSDK.S3 -

edit:- need move files created on amazon s3 azure blob storage, i've not used amazon s3 before , details have been provided include 'path' i'm not 100% on how use awssdk.s3 nuget package in c#.. so, having never used amazon s3 before, , trying build azure worker role (or webjob) watch storage location , move file or files azure blob storage when appear - seems easy, i'm failing @ authentication stage s3, , problem 'path' variable have. i have tested connection using cyberduck, , have following params: access key id, secret access key, , path.. path "folder/folder/" without path, receive access denied response cyberduck... fine, expected - cannot work out how embed path either visual studio aws credential manager or in code within test console harness i've written.. the aws explorer, deals credentials allows me enter: access key id, secret access key, account number ???? do need code manually? been reviewing this, not had enou...

API query in AngularJS returns nothing, Laravel 5.1 RESTful API, Angular JS (1.5 / 1.4.9) Front End -

wow, i'm @ loss , have been fitting days. use ... problem : when query api in angular javascript don't data in response. know api working nothing attached $scope.data sending view, other $scope variables work. have attempted fix issue using angular $http resource , restangular angjs service link . here details of problem, , suggestions. current config : i'm developing site uses laravel 5.1 restful api. located on local vagrant instance of homestead url >> http://api.platspl.at:8000/ i know works because if go >> api.platspl.at:8000/tracks, (abbreviated): [{"id":1,"name":"track 1 name","slug":"track-1-name",...,"updated_at":"2016-01-31 15:30:56"},{"id":2,...,"updated_at":"2016-01-31 15:30:56"},{"id":3,...,"updated_at":"2016-01-31 15:30:56"}] here code controller: public function index() { // using model ...

android - How to use createFriendShip(..) in Twitter4J? -

builder = new configurationbuilder(); builder.setoauthconsumerkey(pref.getstring("consumer_key", "")); builder.setoauthconsumersecret(pref.getstring("consumer_secret", "")); accesstoken accesstoken = new accesstoken(pref.getstring("access_token", ""), pref.getstring("access_token_secret", "")); twitter = new twitterfactory(builder.build()).getinstance(accesstoken); try { twitter.createfriendship("barackobama",true); } catch (twitterexception e) { log.e("hata : ",e.getmessage()); } i error 403:the request understood, has been refused. accompanying error message explain why. code used when requests being denied due update limits ( https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following ). message - unable follow more people @ time. ...

sql - Access returning invalid data for specific column names -

while it's true have not used access dbms pretty long time, behavior see unacceptable. here query: select month([my_datetime_column]) [period] [my_table] if use [month] or [period] alias, returned value date/time , if use [month1] or [period1], returned value int (correct). what's going on here?

R: return array index of partial string match -

suppose have 10x10 matrix populated 1:100. want search numbers ending in '0', , want [i,j] index numbers. tried which(..., arr.ind=t) , couldn't find function works it. tried grep('0$', ...) returns single index of matrix vector. suppose possible turn number binary index, there simpler way? x <- t(matrix(1:100,nrow=10,ncol=10)) # output: # [1,] 1 10 # [2,] 2 10 # ... # [10,] 10 10 we can convert grepl output matrix same dim original 'x' , use which arr.ind=true . which(`dim<-`(grepl('0$', x), dim(x)), arr.ind=true) # row col # [1,] 1 10 # [2,] 2 10 # [3,] 3 10 # [4,] 4 10 # [5,] 5 10 # [6,] 6 10 # [7,] 7 10 # [8,] 8 10 # [9,] 9 10 #[10,] 10 10 or without changing dim , grepl output logical vector, negate ( ! ) true becomes false , false true, multiply original matrix output in matrix . replace values in 'x' ends '0' 0. negate ( ! ) again 0 gets convert ...

c# - SSH.NET - An established connection was aborted by the software in your host machine -

i'm using ssh.net connect , send commands linux. until yesterday sles 12 , worked fine. today i've upgraded sles12 sp1 , when i'm trying connect server (through application ssh.net) exception - established connection aborted software in host machine. time use putty or git bash connect machine , there no problem. putty , application using same port (22). can do? i'm pretty sure problem lies in sles configuration. i don´t know sles12 i'm shure uses sshd , what's causing problem. in latest version, minimum key sizes increased , brakes ssh.net causing exception. a patch has been submited , integrated in next release. until then, solution use pre-release version of ssh.net more info: https://github.com/duplicati/duplicati/issues/1687 https://sshnet.codeplex.com/workitem/1973

What are the security implications (if any) of allowing any password? -

as ars , many others have pointed out, large organizations extensive, presumably intelligent departments employ rules password creation not in best interest of security. sometimes though, still hard understand why applications restrict characters allow others, , why other applications have rules contrast other applications. of makes me feel missing something. i have been taught never trust raw input user, feels wrong allow input user , not validate it, conflicted. in case feel there strong argument allowing user enter anything, , not validate (because there no need). for illustrative reasons, take following hypothetical user registration system: a hypothetical user registration system a user navigates form registering account website. among other inputs, user prompted password. user told may enter desired password. there no rules. can absolutely string of characters. upon receiving submitted form (or request, legitimate or malicious), server not validate password fiel...

postgresql - Is the first has_many redundant? - Ruby on Rails Active records associations -

rails 4.2 newbie: 2 questions; 1) first has_many redundant? since name plural of save class? can have only: has_many :savers, through: :saves, source: :saver or better; has_many :savers, through: :saves if answer yes, can set "dependent: :destroy"? class post < activerecord::base belongs_to :user has_many :saves, class_name: "save", foreign_key: "saver_id", dependent: :destroy has_many :savers, through: :saves, source: :saver end class save < activerecord::base belongs_to :saver, class_name: "user" validates :saver_id, presence: true end class user < activerecord::base has_many :posts, dependent: :destroy ... end 2) typical blog model, user can 'save' posts posted user timeline. model make use best practices? specially in db performance, doing join posts saved user. 'save' table have 100mm rows? lets first alter example bit make naming less c...

angularjs - How to send csv from angular to flask and load into pandas? -

i trying post csv file client server , load file pandas. error ioerror: expected file path name or file-like object, got type i tried sending same file same url through postman , there no error. think there problem how angular sends file or how appended formdata. app.py from flask import flask, render_template, request, send_from_directory minimongo import model, configure import pandas import csv app = flask(__name__) configure(host="xx.xx.com", port=xx, username="xx", password="xx") class placement(model): class meta: database= "flask_api" collection = "placements" @app.route('/') def index(): return render_template("index.html") @app.route('/<path:path>') def send_static(path): return send_from_directory('static', path) @app.route('/receive_form', methods=['get', 'post']) def receive_form(): instance = placement() inst...