Posts

Showing posts from August, 2011

linux - error: could not find function install_github for R version 2.15.2 -

i'm having multiple problems r right want start asking 1 of fundamental questions. i want install github files r, reason install_github function doesn't seem exist. example, when type: install_github("devtools") i get error: not find function install_github the install_packages function worked fine. how can solve problem? to add, want ask whether there way upgrade r, since version 2.15.2 doesn't seem compatible of packages want work with. i'm using linux version 3.6.11-1 redhat 4.7.2-2 fedora linux 17.0 x86-64. i checked cran website seemed have unupdated versions of r (if possible) dates way '09. love update myself old version of r. advice on too? install_github function of devtools package. have install , load devtools before using install_github : install.packages("devtools") library("devtools") install_github("youruser/yourrepo")

wxpython - Is there any Shortcut associated with key '2'(keycode=50) in Flatmenu? -

i trying develop application displaying flatmenu,toolbar , following panel.in toolbar have put textctrl. when trying enter key '2' not getting typed.i tried debug code printing keycode in log in textctrl not getting typed.apart '2' other key able enter. code import wx import os import sys import webbrowser import wx.lib.scrolledpanel scrolled import wx.lib.agw.flatmenu fm wx.log.setloglevel(0) class mainpanel(wx.panel): def __init__(self, parent): """constructor""" wx.panel.__init__(self, parent,style=wx.tab_traversal) class myframe(wx.frame): def __init__(self, parent): wx.frame.__init__(self, parent, -1, "flatmenu demo") self.toolbar = self.createtoolbar() self.textctrl = wx.textctrl( self.toolbar, wx.id_any, value='',size=(100, -1)) self.textctrl.bind(wx.evt_key_up, self.handlekeypress) self.createtoolbaritem(0,1,"c

ruby - Creating scss variable in config.rb for scss files -

how define scss variable in config.rb scss file[ compass project ] my use-case in config.rb file like a = true in style.scss use variable @if == true{ background: #fff; } @else { background: #000; } one of solution http://worldhousefinder.com/?p=124141 but not worked me. you can't/shouldn't this. precompile assets there no way of dynamically adapting changing variables. might work config.rb variable, bad pattern use , you'd have recompile assets every time change variable, defeats purpose of doing if else checks in sass. a easier approach either add class .active .inactive on elements (body). or output inline css in head things custom colors etc depending on users signed in. what trying do? sounds you'd check whether in production or development? in case like: <body class='<%= "development" if rails.env == 'development' %>'> or even <body <%= "style='background-color: r

backbone.js - How to put data in table with Underscore? -

i have question - how put data method fetch() html? cause when try that, nothing rendering! define([ "underscore", "backbone", "jquery", "pages/restaurantpage/collections/userscollection", "text!pages/restaurantpage/templates/userstable.html" ], function(_, backbone, $, userscollection, userstable) { return backbone.view.extend({ el: $('#data_table'), render: function() { = this; var users = new userscollection; users.fetch({ success: function(users) { var template = _.template($('#data_table').html(), { 'users': users.toarray() }); that.$el.html(userstable); } }); } }); }); and html file: <table alig

java - How do I tell Spring Boot which main class to use for the executable jar? -

execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.0.1.release:repackage failed: unable find single main class following candidates my project has more 1 class main method. how tell spring boot maven plugin of classes should use main class? add start class in pom: <properties> <!-- main class start executing java -jar --> <start-class>com.mycorp.starter.helloworldapplication</start-class> </properties>

python - To print only one occurrence of matching pattern using pcregrep -

is there option in pcregrep allows me print 1 occurrence of matched string pattern? came know option --match-limit. pcregrep not recognizing options. there specific version supports option. i assume --match-limit=1 prints 1 occurrence of matched pattern. you can let me know on other possible ways. executing pcregrep command python script via commands utility of python. before --match-limit, let's review 2 options almost want do. option 1. when want know if can find match in file, don't care match is, can use -l option so: pcregrep -l \d\d\d test.txt where \d\d\d pattern , test.txt contains strings. option 2. count number of matches, use pcregrep -c \d\d\d test.txt this may closest can want do. what match--limit ? --match-limit=1 does work, doesn't want do. from documentation: the --match-limit option provides means of limiting resource usage when processing patterns not going match, have large number of possibilities in se

file.getName() on a File object created in Android from a file path generated in Java produces strange results -

i have huge problem program either didn't have before or didn't notice. have submit work in 3.5 hours can me sees before then. i have java program user select files , paths of files passed android application. within android application, create new file object using path, , later on call fileobject.getname() . this produces different results depending on if java program run in ubuntu or windows. if run ubuntu android app succesfully extracts file name, if run windows android app extracts full path. i had path sent android canonical path, , i've since changed absolute path because wasn't sure if causing issue. hasn't resolved problem. issue result of creating file object within android using windows path? thought wouldn't matter guess wrong. if me within next couple of hours might save degree, because important project , have had submit report not mention issue have encountered, can't explain more have fix it. for clarification, if select file i

java - Android Title overlay's actionbar content -

i have application uses localisation , in of languages, title long size of screen. want scale title if doesn't fit correctly in space has smaller font size. use custom xml file title bar cannot figure out how scale font size depending on if fits or not. looking this, seems need lot of code quite small feature, can me resolve please! custom title: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/title_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/title_gradient" android:orientation="vertical" android:tag="title" > <textview android:id="@+id/title_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerinparent="true" android:grav

xml - XSLT - how to group output by common child element value in XSLT 2.0 -

i have xml file below may have multiple records common child element so: <person> <name>alice</name> <account>001</account> </person> <person> <name>alice</name> <account>002</account> </person> how transform below using xslt 2.0? <person> <name>alice</name> <account>001,002</account> </person> i'm new xslt please excuse potentially novice question. guidance appreciated here. in advance. you can use for-each-group group person elements, , separator attribute on value-of build comma-separated value: <xsl:for-each-group select="person" group-by="name"> <person> <xsl:sequence select="name" /><!-- copy name element --> <account> <xsl:value-of select="current-group()/account" separator="," /> </account> </person> </xsl:fo

ios - UITableView shows wrong cell contents -

i've stucked uitableview , adding cells. i have chat-app based on uitableview displaying messages. works fine when user opens chat old messages. when user adds new message - cell message populated wrong content. i use custom cell displaying messages.here code (simplified): - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { // im using storyboard, don't need if (!cell) part rightmessagecell *cell = (rightmessagecell *) [self.messagetableview dequeuereusablecellwithidentifier:@"right_text_message"]; [self configurecell:cell forindexpath:indexpath]; return cell; } - (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { [self configurecell:self.offscreencell forindexpath:indexpath]; [self.offscreencell setneedslayout]; [self.offscreencell layoutifneeded]; result = [self.offscreencell.contentview systemlayoutsizefittingsize:uilayo

c# - Why are ASCII values of a byte different when cast as Int32? -

i'm in process of creating program scrub extended ascii characters text documents. i'm trying understand how c# interpreting different character sets , codes, , noticing oddities. consider: namespace asciitest { class program { static void main(string[] args) { string value = "slide™1½”c4®"; byte[] asciivalue = encoding.ascii.getbytes(value); // byte array char[] array = value.tochararray(); // char array console.writeline("char\tbyte\tint32"); (int = 0; < array.length; i++) { char letter = array[i]; byte bytevalue = asciivalue[i]; int32 int32value = array[i]; // console.writeline("{0}\t{1}\t{2}", letter, bytevalue, int32value); } console.readline(); } } } output program char byte int32 s

android - Logcat doesn't show & phone crashes -

so, using android studio vor developing android app. the first problem when debug app on phone , crashes (no matter reason is) don't error message, frozen phone doesn't work , have force-restart it. idea why happening? second problem logcat doesn't show in logs while debug on phone don't know caused crash. on emulator have no crashes, don't have google play services there either (that's want test , think causes unknown crash). thx

ios - GLKMathProject gives me estrange numbers -

i can not screen coordinates, big numbers when use code below, can tell me why, position of x, y in radians, wrong ? float aspect = fabsf(self.view.bounds.size.width / self.view.bounds.size.height); glkmatrix4 projectionmatrix = glkmatrix4makeperspective(glkmathdegreestoradians(_overture), aspect, 0.1f, 400.0f); projectionmatrix = glkmatrix4rotate(projectionmatrix, es_pi, 1.0f, 0.0f, 0.0f); glkmatrix4 modelviewmatrix = glkmatrix4identity; modelviewmatrix = glkmatrix4scale(modelviewmatrix, 300.0, 300.0, 300.0); modelviewmatrix = glkmatrix4rotatex(modelviewmatrix, 0.296706); modelviewmatrix = glkmatrix4rotatey(modelviewmatrix, -0.858702); _modelviewprojectionmatrix = glkmatrix4multiply(projectionmatrix, modelviewmatrix); cgsize viewsize = self.view.bounds.size; int viewport[4]; viewport[0] = 0; viewport[1] = 0;

c++ - error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion) -

i'm not sure problem is. gives me error: error c2679: binary '<<' : no operator found takes right-hand operand of type 'void' (or there no acceptable conversion) overloaded << shouldn't giving me error, right? #ifndef animal_h_ #define animal_h_ #include <iostream> #include <string> using namespace std; static int counter; static int getanimalcount() { return counter; } class animal { protected: string *animaltype; public: virtual void talk() = 0; virtual void move() = 0; string getanimaltype() { return *animaltype; } //problem right here v friend ostream& operator<<(ostream&out, animal& animal) { return out << animal.getanimaltype() << animal.talk() << ", " << animal.move(); }; ~animal() { counter--; animaltype = null; } }; class reptile : public animal {

php - Within a product loop, get posts associated with custom taxonomy terms and current product -

i'm working woocommerce in wordpress. i've got 3 products (called "kits") , each kit contains several items. "items" custom post type linked each kit via relationship field. each item has custom taxonomy attached ("departments"). departments have no direct link products (or "kits"), except via items. when display products, want them show <ul> loops through each term found in department. within <li> , have nested <ul> lists each item found in current department , in current product. i've got loop that's working display items associated each product: <a href="#details<?php the_id(); ?>" class="details button" data-id = "<?php the_id() ?>">details</a> <div class="items" id="details<?php the_id(); ?>"> <?php $items = get_field('kit_items');?> <?php if( $items ): ?> <ul>

jquery - Custom Marker for JQPLOT -

Image
is there way add multiple different effects marker? i know there's line, color , shadow properties, me try create following design, i've been failing past 2 hours , have come absolutely nothing! seriesdefaults: { linewidth: 50, color: 'yellow', markerrenderer: $.jqplot.markerrenderer, markeroptions: { show: true, style: 'circle', color: 'white', linewidth: 4, size: 25, shadow: true, shadowangle: 0, shadowoffset: 0, shadowdepth: 1, shadowalpha: 0.07 } } i feel need following attributes: markerbackgroundcolor, markershadowsize achieve result. is there can css3? create own html marker , style that? i tried using markeroptions properties did , failed. therefore wrote own shaperenderer , used instead of default jqplot 1 draw both semi-transparent outer circle , inner marker circle. end result looks this: i've done quick , dirty

angularjs - Angular JS Cross Domain Issue -

i using angularjs $resource data using jsonp. app.controller('hello', ['$scope', 'phone', function($scope, phone,$http) { $scope.data=phone.query(); }]); mycallback = function(data,$scope){ alert(data.found); }; app.factory('phone', ['$resource',function($resource){ return $resource('http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=mycallback', {}, { query: { method:'jsonp', params:{}, isarray:false, callback: 'json_callback' } }); }]); the error console shows "uncaught syntaxerror: unexpected token :". please let me know, how best can handle jsonp data. you have include $scope in factory before accessing it. app.factory('phone', ['$resource','$scope',function($resource,$scope){} ]);

Nesting Ruby gems inside a Rails project -

how create gem project nested inside current rails project? i've got rails project several parts gems. extract these parts gems not leave current rails project. creating new source control repos gems add additional complexity project or organization not ready or able handle. these complexities overcome @ point , ready. so far can think of these items. relocate code single directory root. i'm guessing in vendor path create <something>.gemspec link gem in gemfile of rails app gem 'my_lib_code', path: 'vendor/my_lib_code' what else need do? i'm sure i'm missing important. if c project create shared library make process spits out. or if c# project make .dll . java would... i'm sure ruby can same other languages. half way step between extracted gem , code siting in lib path. this fine approach component-based architecture. you have single repository, single test suite, , single deployment process, while @ same t

asp.net - Ajax tool kit Calendar Extender Limit Year selection -

i using ajax tool kit calendar extender control, want limit year selection 1900 current year only. have seen here year limit use startdate , enddate when in code behind writing calendarext.startdate its giving error 'ajaxcontroltoolkit.calendarextender' not contain definition 'startdate' , no extension method 'startdate' accepting first argument of type 'ajaxcontroltoolkit.calendarextender' found (are missing using directive or assembly reference?) even in designer checked in properties window,there no such property exists control try getting new version of ajax control toolkit..the start , enddate properties introduced in releases after september 2011 ..i have getting both start date , end date properties on calendar extender..

php manipulation of one data simple basic php code execution -

i have solve assignment question touches on simple basic php codings learnt in class far..the question goes: arithmetic-assignment operators perform arithmetic operation on variable @ same time assigning new value. write script reproduce output below. manipulate 1 variable using no simple arithmetic operators produce values given in statements. hint: in script each statement ends "value $variable." output: value 8. add 2. value 10. subtract 4. value 6. multiply 5. value 30. divide 3. value 10. increment value one. value 11. decrement value one. value 10. do guys think question telling me use arrays?? coz i'm gonna take swing @ , assume arrays question wants me write.. here sample answer. hope guys check out , see if answer meets question's needs: <?php $numbers=array("8","10","6","30","11"); echo "value {$numbers[0]}.<br>"; echo "add 2. value {$numbers[1]}.<br

javascript - Pattern match check -

this question has answer here: how check whether string contains substring in javascript? 48 answers how search "completed" in string "test1|completed" is there reular expression can used slove problem. used spilt function you don't need regex here. use string.prototype.indexof function, this "test1|completed".indexof("completed") !== -1 the indexof function return starting index of string being searched in original string. if not found, returns -1 . so, if result of indexof not equal -1 , string being searched there in original string. note: in next version of javascript (ecmascript 6), there function called contains in string objects , can use them this var str = "to be, or not be, question."; console.log(str.contains("to be")); // true console.log(str.contains("que

apache pig - Pig If Else semantics -

i have like a = load 'input-1'; b = load 'input-2'; c = union a,b; where input-1 directory , may empty. whenever empty, union throws exception null. union 1 operation here, other operation join $0, b $0, etc. is possible check nullness of "a" in pig, before using sub sequent operation ? you need pre-process inputs using split function. there no if/else semantics in pig, unfortunately. a = load 'input-1'; b = load 'input-2'; split a_clean if ($0 not null), a_dirty if ($0 null); split b b_clean if ($0 not null), b_dirty if ($0 null); c = union a_clean, b_clean;

Modelling a forum with Neo4j -

i need model forum neo4j. have "forums" nodes have messages and, optionally, these messages have replies: forum-->message-->reply the cypher query using retrieve messages of forum , replies is: start forum=node({forumid}) match forum-[*1..]->msg (msg.parent=0 , msg.ts<={ts} or msg.parent<>0) return msg order msg.ts desc limit 10 this query retrieves messages time<=ts , replies (a message has parent=0 , reply has parent<>0) my problem need retrieve pages of 10 messages (limit 10) independently of number or replies. for example, if had 20 messages , first 1 100 replies, return 10 rows: first message , 9 replies need first 10 messages , 100 replies of first one. how can limit result based on number of messages , not replies? the ts property indexed, query efficient when mixing other clauses? do know better way model kind of forum neo? supposing switch labels , avoid ids (as can recycled , therefore not stable identifiers)

php - Get Max of AVG in Symfony 2.4 Doctrine -

i need max of list of avg in symfony doctrine my doctrine query average follows : select p,avg(p.pathtime) avgtime shopperanalyticsentitybundle:path p join p.shopper sh join p.floor f join f.store s p.floor=".$floorid." ".$filter." group p.xpath, p.ypath to max of list of averages modified (after referring this ): select max(avgtime) maxtime (select p,avg(p.pathtime) avgtime shopperanalyticsentitybundle:path p join p.shopper sh join p.floor f join f.store s p.floor=".$floorid." ".$filter." group p.xpath, p.ypath) i following error: [semantical error] line 0, col 38 near '(select p,avg(p.pathtime)': error: class '(' not defined so switched native sql same result: $maxsql = "select max(t.avgtime) maxtime ( select avg(p.path_time) avgtime path p join shopper sh join floor f join store s p.floor_id=".$floorid." ".$filter." group p.x_p

c# - FormsAuthentication.RedirectFromLoginPage works but Response.Redirect fails -

i'm using formsauthentication manage login.i set cookie userdata need. formsauthenticationticket authticket = new formsauthenticationticket(1, txtusername.text, datetime.now, datetime.now.addmonths(1), false, roles, formsauthentication.formscookiepath); string encryptedticket = formsauthentication.encrypt(authticket); httpcookie authcookie =new httpcookie(formsauthentication.formscookiename, encryptedticket); authcookie.expires = datetime.now.addmonths(1); response.cookies.add(authcookie); //doesn't work //string url = formsauthentication.getredirecturl(txtusername.text, false); //response.redirect(url, false); formsauthentication.redirectfromloginpage(txtusername.text, false); using formsauthentication.redirectfromloginpage redirects correctly sets it's own cookie empty userdata overwriting mine, while response.redirect

html5 - Windows phone 8 Viewport in update 3 includes system tray -

i have app windows pone 8 phonegap , designed in html5, has fixed footer in , system tray visible. @ first when phone (lumia 820) had windows phone 8 update 1 footer show normally. updated phone windows phone 8 update 3 has changes in ie, fixed footer displaced few pixel below , looks cut off. if hide system tray page suggested in here footer works normally. but here system tray not accessible, how can achieve viewport works see system tray? according this there cordova-plugin handle statusbar correctly.

PHP Send file in HTML form to mail -

i want send 2 files attached email using html form. mail send 2 files can't see files when download (size: 0 ko). cant me please? here code of php file: $boundary = "-----=".md5(uniqid(rand())); $header = "mime-version: 1.0\r\n"; $header .= "content-type: multipart/mixed; boundary=\"$boundary\"\r\n"; $header .= "\r\n"; $msg = "je vous informe que ceci est un message au format mime 1.0 multipart/mixed.\r\n"; $msg .= "--$boundary\r\n"; $msg .= "content-type: text/plain; charset=\"iso-8859-1\"\r\n"; $msg .= "content-transfer-encoding:8bit\r\n"; $msg .= "\r\n"; $msg .= "ceci est un mail avec 2 fichiers joints\r\n"; $msg .= "\r\n"; $file = $_files['icone']['name']; $fp = fopen($file, "rb"); // le b c'est pour les windowsiens $attachment = fread($fp, filesize($file)); fclose($fp); $attachment = chunk_split(base64_

nopcommerce - How should I add new table from plugin -

i have made new plugin name nop.plugin.mostviewproduct.product , want know how should insert new table plugin's model file? model file path : nopcommerce_3.20_source\plugins\nop.plugin.mostviewproduct.product\models please advise! :) .. if created new entity plugin plugin must install , update database let plugin project .. have : 1- create entity in domain folder (for example) 2- create entitymap in data folder (for example) 3- create pluginobjectcontext in data folder (for example) 4- create efstartuptask in data folder (for example) as example: 1- create entity public partial class mostviewedproduct : baseentity { /// <summary> /// gets or sets name /// </summary> public string name { get; set; } } 2- create entitymap public partial class mostviewedproductmap : entitytypeconfiguration<mostviewedproduct> { public mostviewedproductmap() { this.totable("mostviewedproduct"); this.haskey

android - where is the location of install apk nmanifiest file -

i'm installing project apk file on device , can view database inside /data/data/com.myapp but did not find manifest file. i go on data/data/myapp and find libs , database. want find manifiest file. how can find manifest file? note my device rooted. the androidmanifest.xml gets bundled aapt .apk file. not stored on file system. for more information please @ how building , running performed.

try catch - (java) variable scope inside try { } when accessing from finally { }? -

i noticed when following variables when in try { }, couldn't use methods on them example: import java.io.*; public class main { public static void main()throws filenotfoundexception { try{ file src = new file("src.txt"); file des = new file("des.txt"); /*code*/ } finally{ try{ /*closing code*/ system.out.print("after closing files:size of src.txt:"+src.length()+" bytes\t"); system.out.println("size of des.txt:"+des.length()+" bytes"); } catch (ioexception io){ system.out.println("error while closing files:"+io.tostring()); } } } } but when declarations placed in main() before try{ } program compiled no errors, point me solution/answer/workaround? you need declare variables before enter try block,

angularJS using TypeScript the difference between the following methods -

could please explain difference between 2 methods load controllers,service.... etc var appmodule = angular.module("myapp", []); appmodule.controller("mycontroller", ["$scope", ($scope) => new application.controllers.mycontroller($scope)]); module todos { 'use strict'; var todomvc = angular.module('todomvc', []) .controller('todoctrl', todoctrl) .directive('todoblur', todoblur) .directive('todofocus', todofocus) .service('todostorage', todostorage); } the first method dependency injection inline. second method depends on $inject/constructor argument being setup in controller. suggestion : http://www.youtube.com/watch?v=wdtvn_8k17e&hd=1

javascript - how can I change the label name when the option value change? -

i have combo box , values 1 , 3 inside combobox. when page loads default value 1 , default label name 1.... if select 2 on combo box make label name 2. function changelabel(){ if (document.getelementbyid('conbobox').value !=1) {document.getelementbyid('mylabel').label="2"} } i can't see markup, assume element id 'mylabel' div labeling combobox element. if case, use document.getelementbyid('mylabel').innerhtml = "2"

android - What are the dangers of setting outWidth and outHeight instead of inSampleSize for decoding bitmap -

to resize bitmap in android, thinking of doing bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 1; options.injustdecodebounds = true; bitmapfactory.decodefile(filepath, options); // options.insamplesize = imageresizer.calculateinsamplesize(options, x, y); options.outwidth = x; options.outheight = y; options.injustdecodebounds = false; bitmap bmp = bitmapfactory.decodefile(filepath, options); please, notice line commented out. how approach differ (compare , contrast) more usual bitmapfactory.options options = new bitmapfactory.options(); options.insamplesize = 1; options.injustdecodebounds = true; bitmapfactory.decodefile(filepath, options); options.insamplesize = imageresizer.calculateinsamplesize(options, x, y); // options.outwidth = x; // options.outheight = y; options.injustdecodebounds = false; bitmap bmp = bitmapfactory.decodefile(filepath, options); how if keep of them? in bitmapfactory.options options = new bitmapfactory.options()

javascript - Moderated Dynamic Word Cloud -

i wondering if knew of app or widget site users can input words word cloud, popular words bigger. also, has moderated. thank you. i have idea, use 1 of pretty generators worditout using data gathered user inputs. or maybe use application this: http://wiki.tcl.tk/17850 hope you. cheers.

javascript - Dojo using deferred functions to get data in ajax callback function -

i have function return in function there async request holds value suppose returned function. understand nature of async request function complete , not return value while waiting on async function complete. i attempted use dojo deferred functions have function postinformation() return value within ajax request callback. having issues , not sure issue is. under code: dojo deferred function function postinformation(){ var haserrors = false; var containers = [dijit.byid("container1"), dijit.byid("container2")]; var employee = { //data }; var def = new dojo.deferred(); def = dojo.xhrpost({ url: 'hello', content: employee, load: function (data) { formerrors = { "errors": true, "fname": "123", "surname": "456", "onames": "789",

css - grunt-cssc not working "cannot read property 'type'" ~ Foundation 5 -

i having trouble using grunt-cssc in foundation 5 framework. error: running "cssc:build" <cssc> task warning: cannot read property 'type' of undefined use --force continue. my code: cssc: { build: { files: { 'css/app.css': 'css/app.css' } } }, it conflicting libsass or else foundation side. i solved adding options , setting "sortdeclarations", "consolidateviaselectors", "consolidatemediaqueries" false . cssc: { build: { options: { sortselectors: true, linebreaks: true, sortdeclarations:true, consolidateviadeclarations:false, consolidateviaselectors:false, consolidatemediaqueries:false, }, files: { 'css/app.css': 'css/app.css' }

How to get ASP.NET MVC 5 app with Facebook, Twitter, etc. sign-on working with SSL -

Image
i'm working through tutorial oauth stuff working: http://www.asp.net/mvc/tutorials/mvc-5/create-an-aspnet-mvc-5-app-with-facebook-and-google-oauth2-and-openid-sign-on i've gotten far turning on ssl , when press f5 start app and, start page doesn't load. i've not gotten far turning on of oauth providers or anything, won't work ssl. i know isn't ton go on perhaps has seen before , solved it? thanks in advance.... first of select web application project in solution explorer , press f4 view properties. set ssl enabled true . in case important anonymous authentication enabled. next edit project's web settings , change project url ssl url first properties panel, selecting web application project in solution explorer , pressing alt+enter , clicking web on left side. in these screenshots can see ssl url has port 44301.

NixOS nVidia Driver Version Bounds -

i'm trying nixos work old geforce 6600, accepts nvidia driver version <305 (304.xx). there way put upper bound on kernel module version / proprietary version in configuration.nix ? appreciated! you have use nvidialegacy304 instead of nvidia in system.xserver.videodrivers = [ "nvidia..." ]; declaration (use hardware.opengl.videodrivers unstable channel).

sql - MySQL: When To Break Up / Split a Table -

i'm building database , i'm not sure how deep of hierarchy should make. it seems best case space saving 3 layers. group->sub_group->item in average scenarios there 300 items subgroup , 100 subgroups groups. items nearing 1 million , growth accelerating. i'm attached distinguishing group item because reflects real world, sub_group exists because items identical few hundred rows. clear, take data in 1 instance of sub group , attach every instance of item. would making @ least 3 joins in every query better performance? or better off making less tables more repetitive data? this isn't mysql question sql rdbms question in general. you have database normalized eliminate duplication , minimize storage. you may right normalize , put subgroup info item if: the subgroup data small. you query both subgroup , item information , view isn't sufficing. you have performance issue drive change--don't prematurely optimize. there other consi

wordpress the_content not showing video -

i developing separate website , showing blogs using worpress.i have used following code display blogs.it shows textual contents video shows player bar , not click able. i have checked themes index.php there no the_excerpt. when check preview of post using wordpress admin shows video properly. can me resolve this? here code.. <?php global $more; $posts = get_posts('category=3&numberposts=10&order=asc&orderby=post_title'); foreach ($posts $post) : setup_postdata( $post ); ?> <?php $more = 1; ?> <?php the_date(); echo "<br />"; ?> <span style="color:#1c1644;font-size:1.3em !important;font-weight: bold;"> <?php the_title(); ?> </span> <div id="lol"><?php the_content(); ?> </div> <hr> <?php endforeach; ?> please try this <?php global $more; $posts = get_posts('category=3&numberposts=10&order=asc&orderby=post_title');

html - not able to pick value from webpage and get it into excel -

i new vba, want data webpage excel sheet.. have written code visiting web page, input value , clicking on submit button. on clicking submit button, next webpage comes.. want emailid webpage excel sheet.. please help the code have written follows: sub emailforcform() dim ie internetexplorer dim html htmldocument set ie = new internetexplorer ie.visible = true ie.navigate "https://registration.apct.gov.in/ctdportal/search/emailsearch.aspx" while ie.readystate <> readystate_complete application.statusbar = "trying connect" doevents loop set html = ie.document ie.document.all("ctl00$contentplaceholder1$txttin").value = "28740213505" ie.document.all("ctl00$contentplaceholder1$butget").click range("c4").value = ie.document.all("contentplaceholder1_updatepnl").value end sub this works me... sub test() set ie = new internetexplorer ie.visible = true ie.navigate "https://registrati

HTML5 <video> tag for ogv file not work in Mozilla . Any better solution? -

there problem firefox. lot of questions there related didnt solution it. in link video tag's video not working in mozilla , in crome working fine. type='video/ogg' added no luck yet. you use jquery check browser , load best format only... i consider webm better firefox or chrome.. else, can use mp4. just : your html : <video id="frog" loop autoplay ></video> your js : $(window).load(function(){ var is_firefox = navigator.useragent.tolowercase().indexof('firefox') > -1; var is_chrome = navigator.useragent.tolowercase().indexof('chrome') > -1; if(is_firefox || is_chrome){ // firefox or chrome, webm better $("#frog").attr("src","http://www.ellevation.com.au/sanli/wp-content/uploads/2014/04/testvid_vp8.webm"); }else{ $("#frog").attr("src","http://www.ellevation.com.au/sanli/wp-content/uploads/

javascript - how to prevent css animation from running on page load -

i have container div set overflow:hidden swaps between 2 cards, 1 visible @ time: [card 1 | card 2] i have jquery set that, when user clicks on button, toggles class, .slid , on div , stylus styling changes margin-left parameter -400 or so. .container &.slid { margin-left: -400px; this works; whenever press button, cards flip , forth. i wanted write animation cards slide , forth instead, changed stylus code to .container{ animation: slideout 1s; &.slid { margin-left: -400px; animation: slidein 1s; } with corresponding animations: @keyframes slidein { { margin-left: 0px; } { margin-left: -400px } } @keyframes slideout { { margin-left: -400px; } { margin-left: 0px; } } this works more or less intended, have 1 problem: since stylus code set run animation on load, page refresh run

javascript - mapbox pins do not load all the time from geojson -

i have weird issue on mapbox js. loading in geojson files pins, works fine of time no errors. every json not seem load , no pins appear. does not seem browser specific problem, or cache or cross domain (as same server , never work). guessing in our geojson or js, never ever work. our next step add callback , try loop again, wondering if there simple overlooking in way map box , geojson play together? so turns out issue here having series of objects on map within map box (a pin, drawn boxes). load in geojson. so loading not issue, adding layer being flatly ignored.

python - Finding more than one occurence using a regular expression -

is possible capture of information in href using 1 regular expression? for example: <div id="w1"> <ul id="u1"> <li><a id='1' href='book'>book<sup>1</sup></a></li> <li><a id='2' href='book-2'>book<sup>2</sup></a></li> <li><a id='3' href='book-3'>book<sup>3</sup></a></li> </ul> </div> i want book , book-2 , book-3 . short , simple: html = '<div id="w1"><ul id="u1"><li><a id='1' href='book'>book<sup>1</sup></a></li><li><a id='2' href='book-2'>book<sup>2</sup></a></li><li><a id='3' href='book-3'>book<sup>3</sup></a></li></ul></div>' re

c# - Collect data and display the data in a column label -

how can sum column table without datagridview , i'm using sql command method , database in sql server 2008. this script using system.data; datatable dt = new datatable(); sqldataadapter sda = new sqldataadapter("select price pricelist", connection); sda.fill(dt); int sum=convert.toint32(dt.compute("sum(price)","")); label1.text=sum.tostring();

ios - Autolayout For Subviews of UITableViewCell not works well -

in uitabelviewcell ,there problem when add uiview , uilabel . uilabel has dynamic height, , uiview has fixed rect, think. first of all, translatesautoresizingmaskintoconstraints = no both of them, , label's preferredmaxlayoutwidth = 280 , , numberoflines = 0 . constraints ,as follows: nsdictionary *views = @{@"_label":self.label,@"_view":self.view}; [self.contentview addconstraints:[nslayoutconstraint constraintswithvisualformat:@"|-[_label]-|" options:0 metrics:nil views:views]]; [self.contentview addconstraints:[nslayoutconstraint constraintswithvisualformat:@"|-[_view]-|" options:0 metrics:nil

android - Listview : enable in adapter if view is enabled -

my listview populate custom cells , custom adapter. if cell disabled, want set isenabled() false in adapter : @override public boolean isenabled(int position) { // if cell disabled, return false. if not return true } but cell don't know adapter. there way current cell object in isenabled() method ? you make use of getitem(position) , use postition in overriden method, assuming have overrided getitem in adapter.

jquery - getting javascript error while iterating through array -

function sortproducts(filprodlist) { var prod; var k = 0; (i = 0; < filprodlist.length; i++) { var k = + 1; var p=filprodlist[i].entitykey.substr(filprodlist[i].entitykey.length - 1); var p2=filprodlist[k].entitykey.substr(filprodlist[k].entitykey.length - 1); if ( p>p2) { temp = filprodlist[k]; filprodlist[k] = filprodlist[i]; filprodlist[i] = temp; } } rederproduct(filprodlist); } while executing above code getting following error typeerror: filprodlist[k] undefined don't var inside loops, blocks don't have scope in javascript , var every variable want use in 1 var statement. end loop when highest index reaches end ( k ). can move k for 's iterate step because you're iterating this, too. function sortproducts(filprodlist) { var prod, i, k, p, p2, temp; (i = 0, k = 1; k < filprodlist.length; ++i, ++k) { p = filprodlist[i].entit

entity framework - Linq query containing sum and subquery not working -

i bit new linq , entity framework , have requirement write linq query in data access layer. sql want produce is: select c.configurationid, configurationdescription, coalesce(d.enrolment,0) enrolment, coalesce(d.accepts,0) accepts, coalesce(d.rejects,0) rejects, coalesce(d.incomplete,0) incomplete vvconfiguration c (nolock) left join ( select configurationid, sum(case when d.dialoguestatusid = 1 , d.processtypeid = 1 , e.createdate = dates.maxcreatedate 1 else 0 end) enrolment, sum(case when ec.verificationdecisionid in (2, 3, 5) , d.processtypeid = 2 , e.createdate = dates.maxcreatedate 1 else 0 end) accepts, sum(case when ec.verificationdecisionid = 6 , d.processtypeid = 2 , e.createdate = dates.maxcreatedate 1 else 0 end) rejects, sum(case when d.dialoguestatusid = 4 , (e.createdate = dates.maxcreatedate or e.createdate null) 1 else 0 end) incomplete dbo.dialogue d (nolock) left join exchang