Posts

Showing posts from January, 2011

google analytics - How to track the install referrer in ios -

google analytics - How to track the install referrer in ios - i doing 1 application.in want implement 1 feature android.in android can number of downloads using install referrer.so in ios how can install referrer. one way (you should clarify customers if ok them) send info server . maintain track of session count (or set single value nsuserdefaults ) , application version , should fine: install: session count 0, send "hello" message server (server stores device id ) reinstall: same " install " (server recognizes device id exists) update: application version not same on lastly startup, send " update " message server ios google-analytics referrer

c# - Jquery $.post in while loop -

c# - Jquery $.post in while loop - this code : @ { httpcookie cookieportrait = request.cookies["photoportraitcookie"]; int pportraitkeyscount = (cookieportrait.values.keys.count); } <script> $(function () { var specarr = new array(); @ { int n = 0; while (n < pportraitkeyscount) { string str = cookieportrait.values.getkey(n).tostring(); @: var datass = {}@: datass = {@: decode: '@str', @: '__requestverificationtoken': $('[name="__requestverificationtoken"]').val()@: }@: $.post('/photo/decode', datass, function (datar) {@: specarr.push(datar);@: });@: specarr.push('@httputility.urldecode(generalcookie.values.getvalues(n).getvalue(0).tostring())') @: n++; } }) </script> its tries take cookie , fill array cookie values , because uses swedish languages , encoded values , must post

Avoid code duplication Chocolatey Packages -

Avoid code duplication Chocolatey Packages - introduction multiple functions have been added chocolatey package. these functions applied other chocolatey packages well. this done copying functions each of them. however, if function optimized these changes needs copied packages. question how avoid code duplication in chocolatey packages? i have few suggestions how proceed this... (probably 1 take longest due dependency on other people) if these functions re-usable, yourself, , other people, suggest submitting pull request chocolatey core, add together these functions chocolatey. way, gets benefit. split functions separate file, , dot source them chocolatey packages creating. within source command repository, store file in mutual location, , add together each chocolatey bundle required. further refactor extracted .ps1 file, runs module create. create chocolatey bundle deploys powershell module (there examples of doing on chocolatey.org - shout if don

javascript - Form Submit Listener prevent form submission on IE8 -

javascript - Form Submit Listener prevent form submission on IE8 - i have set universal analytics tracking website using google tag manager , have had success using form submission listener track different form submissions. came attending today users in ie8 unable submit login forms. login forms native forms on site, whereas other forms added via javascript eloqua. as disable form submission listener, ie8 users can log in without issue. because user could have log in on page of site, i've had disable form tracking now. form html <form class="login-prompt__form" method="post"> <div class="input input--text"> <input id="username" name="username" placeholder="username" type="text" value="" /> </div> <div class="input input--text"> <input id="password" name="password" placeholder="

android - Closing scanner application/activity after a timeout -

android - Closing scanner application/activity after a timeout - i using intentintegrator initiate scanner (qr/barcode - zxing) application. have requirement close scanner application after 30 seconds of start. scanner application invoked through startactivityforresult. wondering if there way reference of activity started "startactivityforresult", that, can utilize timer , close activity. android experts, please help me here. i think alternative here modify zxing code. when start scanning activity, app's activity go onpause() @ point need cancel timer(s), not start new ones. another thought might start service, starts thread kills scanning activity after 30 seconds...but alas, can't kill activity service. zxing open source, can pull down, modify , rebuild it. there class called inactivitytimer.java can modified finish activity after x seconds. alternative might add together broadcast receiver scanning manifest finish scanning activity when

html - Displaying a table next to a fixed width span -

html - Displaying a table next to a fixed width span - i have html <table> have dynamic width (changes window size), , fixed width <span> (500px). i want display both next each other both fill whole width of parent container i want using css (not js) i have been playing around css seems ruining table's width html <div class='container'> <table class='table'>....</table> <span class='span'>....</span> </div> css .container { ...... } .table { ..... } .span { width: 500px; display: inline-block; //or block if neccessary } you may give seek table-layout propertie .container , span . browsers should create element missing produce first table-cell. demo span { display:table-cell; width:500px; border:solid; } table { border:solid; margin:0; width:100%; } .container { display:table; width:100%; table-layout:fixed; } this should work be

php - Adding multiple check box values to a database -

php - Adding multiple check box values to a database - i trying create table user ticks boxes of nutrient have eaten , carb value sent table. contents of table on database phone call code: while($row = mysqli_fetch_array($q)) { echo "<form action='add.php' method='post' id='add'><tr>"; echo "<td>".$row['carb_id']."</td>"; echo "<td>".$row['food_item']."</td>"; echo "<td>".$row['serving_size']."</td>"; echo "<td>".$row['carbs_per_serving']."</td>"; echo "<td><input type='checkbox' value='".$row['carbs_per_serving']."' name='food[]'></td>"; echo "</tr></form>"; } echo "<input type='

java - How to store images to jackrabbit and deliver those images to HTML pages? -

java - How to store images to jackrabbit and deliver those images to HTML pages? - how store images jackrabbit , deliver images html pages? ex. if user upload multiple images 1 html page should able see images in next html page or other page when required this way: public class jackrabbitserviceimpl { repository repository = new transientrepository(); public jackrabbitserviceimpl() throws exception{ session session = repository.login( new simplecredentials("username", "password".tochararray())); try{ inputstream stream = new bufferedinputstream(jackrabbitserviceimpl.class.getresourceasstream("red_rose.jpg")); node folder = session.getrootnode(); node file = folder.addnode("redrose.jpg","nt:file"); node content = file.addnode("jcr:content","nt:resource"); bina

java - HQL double join query with one to many relationship -

java - HQL double join query with one to many relationship - this hql query has been driving me wall, , hope can help me out. here info model: public class record { private int id; private string name; private set<recordfielddata> recordfielddata; } public class recordfielddata { private int id; private string data; private record record; private recordtypefield type; private user relateduser; } public class recordtypefield { private int id; private string datatype; } here data: record ------------------------------------------------- | id | name | ------------------------------------------------- | 1 | round cookie | | 2 | square cookie | | 3 | oval cookie | ------------------------------------------------- recordfielddata -------------------------------------------------------- | id | record_id

html - CSS Align Divs Correctly -

html - CSS Align Divs Correctly - so have these 2 big divs, want 1 mainbar, , 1 sidebar right. i've tried making them both float left, tried using width percentages couldn't figure out. maybe guys can? html code: <div class="container box" style="clear:both !important;"> </div> <div class="sidebar sidebarbox" style="clear:both !important;"> </div> then css: .box { background-color: rgba(224, 222, 217, 0.25); -moz-box-shadow: 0 0 10px #1a1a18; -webkit-box-shadow: 0 0 10px #1a1a18; box-shadow: 0 0 10px #1a1a18; border: 1px solid #ffffff; margin-top:25px; } .container { margin-left: auto; margin-right: auto; float: left; width: 60%; padding: 20px; background-color: none; border: 1px solid #c9c7c8; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; min-height: 450px; } .sidebar { float: left; width: 20%; padding: 20px; background-color: none; border: 1px solid

linux - Attempting to build an opensource project that depends on opencv -

linux - Attempting to build an opensource project that depends on opencv - i trying build source code of active appearance model c++ implementation, source of provided here: https://code.google.com/p/aam-opencv/ along instructions on how build code: get aam-opencv.tar.gz edit opencvwebcam.cpp -> int opencvwebcam::startcamera() either video or webcam how build {{{ cd build cmake .. create }}} two binaries generated qt-aamtrainer -> aam training runner -> aam fitting however getting next error when execute cmake: -- checking gnucxx version 3/4 determine opencv /opt/net/ path cmake error @ cmake/modules/findopencv.cmake:239 (message): opencv required headers or libs not found. please specify it's location opencv_root_dir env. variable. phone call stack (most recent phone call first): cmakelists.txt:48 (find_package) -- configuring incomplete, errors occurred! any ideas on how prepare ? my os is: ubuntu 1

Center Box with HTML5 -

Center Box with HTML5 - i have problem center textbox area using html5 here code `<!doctype html> <html> <head> <meta charset="utf-8"> <title>untitled document</title> </head> <body> <div class="smart_pdbox" style=" width: 366px; border: 1px solid #fff; height: 320px; float: left; margin: 5px 29.75px 5px 29.75px; padding: 12px 5px 0 5px; text-align:center;"> <div class="smart_pdtitle" style=" font-size:14px; color: #fff; border: solid 3px #ffdb6e; font-weight: bold; padding-top: 2px; padding-bottom: 2px; overflow: hidden; height: 34px; background:#ffdb6e; width: 144px;" ><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div> </div> </body> </html> i'm not using or

python - Sendgrid outgoing email to appear in my Sent Mailbox -

python - Sendgrid outgoing email to appear in my Sent Mailbox - i sending emails using sendgrid: default_from_email = 'david@gmail.com' email = emailmessage(subject, message, default_from_email, to_emails) email.send() however, when go sent mail service box in gmail, email not show. there way such when send email sendgrid, show in sent mail service box on gmail, maintain record of it? sendgrid's bcc app allow bcc email address, in case gmail account, every email sent; though still can't filter sent mail. documentation can found here. python email smtp gmail sendgrid

oracle11g - what is the best way to store XML in oracle? (CLOB vs XMLTYPE vs VARCHAR) -

oracle11g - what is the best way to store XML in oracle? (CLOB vs XMLTYPE vs VARCHAR) - in oracle can store xml files in different types of variables xmltype or clob or varchar2 . want know difference between them , benefits of of them? , there difference between xmltype column in regular table , xmltype table storing xml files in table? xml oracle11g xmltype

symfony2 - Handling Fatal Errors with the Twig Exception Controller -

symfony2 - Handling Fatal Errors with the Twig Exception Controller - i working on symfony project , trying create user-friendly error pages production environment. this, have overridden twig.exception_controller parameter. process described in symfony documentation. in overriding exception controller, have been able create custom error pages instances no routes exist, or uncaught exception in thrown. have not been able work fatal errors, , question about. is possible catch/handle fatal errors in symfony? not attempting go on running application (as answerer of question suggests) when fatal error occurs. show error page, aside standard 1 has function-call stack trace. i attempted set shutdown function using register_shutdown_function , did not prevent default error page (with stack trace) displaying. thanks! you can set proccesses might fail seek block try { // assert fails because have buggy code here $foos=$fooservice->getfoosbydatetime(); }catch(\ex

jquery - JScrollPane (Custom Scrollbar) in a PopEasy Modal Window -

jquery - JScrollPane (Custom Scrollbar) in a PopEasy Modal Window - first time posting :-) i've looked everywhere reply , can't seem find it. i'm not jquery expert way around. popeasy: http://thomasgrauer.com/popeasy jscrollpane: http://jscrollpane.kelvinluck.com/index.html i'm trying jsscrollpane work within of popeasy modal window. terminology might off, think need initilize after modal loads? here's code popeasy modals: click link , modal shows: $('.modallink').modal({ trigger: '.modallink', olay:'div.overlay', modals:'div.modal', animationeffect: 'fadein', animationspeed: 300, movemodalspeed: 'slow', openonload: false, docclose: true, closebyescape: false, moveonscroll: false, resizewindow: true, close:'.close-button' }); normally, jscrollpane be: $('.scroll-pane').jscrollpane(); i'm assuming (and hoping) reply simple , i&

c# - How to give a downloaded file unique name -

c# - How to give a downloaded file unique name - i have c# application saves completed pdf file on folder within site. during operation save 2 session variable filename , filepath in server: string strfilename = "completed_pdf_" + k + ".pdf"; //k variable in function name session["filename"] = strfilename; messagebox.show(session["filename"].tostring()); //displays: completed_pdf_{name}.pdf newfileserver = system.environment.machinename + @"/pdfgenerate/completed_pdf_" + k + ".pdf"; strfullpath = path.getfullpath("//" + newfileserver); list<system.web.ui.webcontrols.listitem> files = new list<system.web.ui.webcontrols.listitem>(); files.add(new system.web.ui.webcontrols.listitem(strfullpath, strfullpath)); strn = files[0].tostring(); session["pathname"] = strn; messagebox.show(session["pathname"].tostring()); //displays: \\myserver\pdfgen\completed_pdf_{name}.pdf i have gr

Defining Python Operators: A List -

Defining Python Operators: A List - in learn python hard way zed shaw there list of operators weren't defined given exercise, , i've had problem trying find definition / purpose around web. here's have far: + : addition/concatenation - : subtraction * : multiplication ** : exponenttiation / : partition // : floor partition :: digits after decimal place removed % : string type flag? < : less > : greater <= : less / equal >= : greater / equal == : absolute equality != : not equal <> : old not equal -- apparently phased out, utilize above != () : ________________________ [] : ________________________ {} : ________________________ @ : decorators, maybe matrix multiplication in 3.5 future release ' : ________________________ : : ________________________ . : used modifying/linking element property/subproperty = : equality ; : ________________________ += : duality in operation, successively :: x = x + 1

php - Zend pgsql connection error -

php - Zend pgsql connection error - i next error while connecting zend , pgsql before programme in mysql working fine array ( [host] => localhost [username] => openerp [password] => postgresql [dbname] => projects_display [adapter] => pdo_pgsql ) fatal error: uncaught exception 'pdoexception' message 'sqlstate[08006] [7] invalid connection alternative "adapter"' in /var/www/projects/display/display_res/library/zend/db/adapter/pdo/abstract.php:129 stack trace: #0 /var/www/projects/display/display_res/library/zend/db/adapter/pdo/abstract.php(129): pdo->__construct('pgsql:host=loca...', 'openerp', 'postgresql', array) #1 /var/www/projects/display/display_res/library/zend/db/adapter/pdo/pgsql.php(87): zend_db_adapter_pdo_abstract->_connect() #2 /var/www/projects/display/display_res/library/zend/db/adapter/abstract.php(860): zend_db_adapter_pdo_pgsql->_c

winapi - Using InitiateSystemShutdown() function under C++ and Qt Framework -

winapi - Using InitiateSystemShutdown() function under C++ and Qt Framework - i utilize initiatesystemshutdown function in c++ mingw. how can load advapi32.dll , phone call function initiatesystemshutdown ? the requirements section of documentation contains information: header: winreg.h (include windows.h) library: advapi32.lib so must include windows.h have function declared. , must link advapi32.lib have function defined. c++ winapi mingw

javascript - How to get an element by Id placed in some namespace in XHTML via JS? -

javascript - How to get an element by Id placed in some namespace in XHTML via JS? - i found out, document.getelementbyid doesn't see ids of these elements, placed in namespace. @ to the lowest degree in ff30.0 , ie11 (don't know other browsers); consider jsp snippet (to forcefulness content-type; work meta http-equiv also): html: <!doctype html> <%@ page language="java" contenttype="application/xhtml+xml; charset=utf-8" pageencoding="utf-8" %> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:t="urn:test"> <head> <meta charset="utf-8"/> <title>test</title> <style type="text/css"> @namespace "http://www.w3.org/1999/xhtml"; @namespace t "urn:test"; html { font-family: 'open sans', 'calibri', 'arial', sans-serif; font-size: 11px; } t|foo { display: inline-block; border: solid 1px #

csv - How to access to specify file in subfolder without change working directory In R? -

csv - How to access to specify file in subfolder without change working directory In R? - in r, want access file in subfolder. don't want alter working directory move back. lost time , long. for exmaple, working on /home/phuong folder. here tree construction of phuong. phuong-> data1, data2, data3. data1-> abc.csv, def.csv, script1.r data2-> bond.csv, option.csv, pricing.r data3->..... so want load info in abc.csv, def.csv , run code in pricing.r. so if utilize code setwd , create me lost many time , code stupid, this: setwd("/home/phuong/data1" ); read.csv("abc.csv"); read.csv("def.csv"); setwd("/home/phuong/data2" ); source("pricing.r") i lost lot of times move folder folder of them in same folder home/phuong/ . need way access file in subfolder without setwd command. please help me , thks. assuming working directory /home/hermie , want load .csv file directory below current wd

squash - In git how can I commit to master without merging? -

squash - In git how can I commit to master without merging? - tl;dr; want way tell git "master has new revision looks same tip of feature a, without history". is there way this? [update: have workflow minimizes problem, still know how tell git following:- commit single alter branchx, create files , folders match @ tip of branch y. possible?] the story we avoid branching feature branches.. had in case. here tried :- master o-----------------o---------------o \ /[squash] / feature o-o-o-o-o-o-o-o / [squash] -- many conflicts \ / feature b o-o-o-o-------------o for various reasons squish onto master. feature b had bunch of changes in mutual feature a, sec squish had lots of merge conflicts. i tried this... master o-----------------o----------------o \ /[squash] / [squash] -- same set of conflicts!! feature

windows - How do I create a .keytab from Active Directory for Tomcat on Linux? -

windows - How do I create a .keytab from Active Directory for Tomcat on Linux? - i have linux web server looking kerberos realm. need give .keypass file, can do. however, what's getting me kdc. cannot determine parent kdc, , don't know server admin server. also, i'm not sure how go process ktpass. has done before, if so, how did it? this has been frustrating me know architectural process, can't figure out in windows domain multiple dcs. linux portion isn't problem, know where, have no thought how pull info windows in way tomcat can read. any help appreciated. thanks! in theory, can map machine in dns domain kerberos realm getting every machine involved utilize same krb5.conf file. however, in practice machine dns name web.foo.com in realm foo.com. to find kdc realm, can dns querys these srv records. dig -t srv _kerberos._udp.foo.com ad supports this. linux windows tomcat7 kerberos spring-security-kerberos

java - Thread id not showing in logs -

java - Thread id not showing in logs - my applications listens messages on queue , publishes results tibco subject. have written message listener called via "onmessage" method of "messagelistener" problem facing threads in logs show same thread name i.e. "tibco ems session dispatcher (21367271)" . , making hard track thread doing what. my log4j look "%d{hh:mm:ss,sss} %-5p %c{1} [%t] - %m%n" . what alter need create proper thread id? edit: i want able differentiate between log messages printed processing of different messages. @ nowadays can't thread name. you free set name of thread like. do: private static atomicinteger count = new atomicinteger(0); public void onmessage(message message) { string oldname = thread.currentthread().getname(); thread.currentthread.setname("my-thread-" + count.getandincrement()) seek { // ... existing code ... } { thread.currentthread().setname(ol

Maple: Find intersection of two functions -

Maple: Find intersection of two functions - i have maple worksheet this: and have been unable figure out how find intersection of two, fsolve returns error? note f function , g equation. , want solve f(x)=y, not f(x)=0. fsolve command should be fsolve({f(x)=y, g}, {x,y}, x= -2..-1); by changing x-range, can 3 intersection points way. there no need give y-range. intersection maple

c# - Identity comparisons of `CultureInfo` objects retrieved using `CultureInfo.GetCultureInfo` -

c# - Identity comparisons of `CultureInfo` objects retrieved using `CultureInfo.GetCultureInfo` - is safe compare cultureinfo objects retrieved cultureinfo.getcultureinfo using identity operator ( == ) ? in other words, cache guaranteed homecoming same objects, or possible might drop entries , recreate them new objects @ later point? note documentation overloads isn't helpful in regard, , alternative of course of study utilize object.equals method. no. there comment in source of private helper method overloads reads: // there race status in code side effect sec thread's value // clobbers first in dictionary. acceptable ---- since cultureinfo objects // content equal (but not reference equal). since create no guarantees there, ---- // acceptable. funny felt need censor word "hack". c# .net locale cultureinfo culture

c - Stack Size, FRDM-KL46Z IAR? -

c - Stack Size, FRDM-KL46Z IAR? - there seems sort of paradox, not able configure right stack size frdm-kl46z iar compiler. i using frdm-demo illustration provided freescale iar compiler. i go project linker settings, , modified cstack 33*1024 (enormous) then re build program, surprisingly build successful - ok. i checked 256_pflash.icf linker file, shows cstack = 33*1024. then, go map file of project. questions: why map file not showing stack size value, in highlighted linker created area? how iar abled build, configure 33*1024 bytes of stack size, while total ram of frdm-kl46z 32 kb only? please, explain happening, want increment stack size, not sure if using right linker files or not. and, doing because facing hardfault error. why trying increment stack size. thanks, c linker stack iar cortex-m

bash - Git displaying a sorted list of lightweight tags using a sort -

bash - Git displaying a sorted list of lightweight tags using a sort - i have load of lightweight tags have been created in repo need sort , homecoming top 5 tags. understanding lightweight tags can't sorted date created pointer commit. i want able (for utilize in bash script) lastly 5 (this in alphanumeric order) so illustration if ran these commands (not ever add together tags this, highlight want): git tag 1.0.0 git tag 1.4.0 git tag 1.2.0 git tag 1.6.0 git tag 1.7.0 git tag 1.8.0 i want list like: 1.8.0 1.7.0 1.6.0 1.4.0 1.2.0 i know can git tag | head -n5 but these not sorted correctly, first 5 tags. i know if these annotated tags utilize git describe or git for-each-ref --sort=-taggerdate \ --format '%(refname:short) %(taggerdate:raw)' refs/tags but doesn't work lightweight tags afore mentioned reason. so there way list lastly 5 (doesn't matter if sorted numerically or date same) lightweight tags? i know http://stac

R apply code to different factors or levels -

R apply code to different factors or levels - below code generate info demonstrate problem. con <- textconnection(' nu na vo 100 60 103 2 104 2 106 5 107 1 108 1 112 50 100 b 1 108 b 4 109 b 2 120 b 30 109 c 40 ') tt <- read.table(con, header = t) close(con) test <- as.data.frame(tt) i've next code. assign value "sta" column subject specific status , add together difference in "nu" between , i+1 row "lag" column. library(dplyr) # sort "na" column , arrange "nu" in descending order # in order apply code below. test2 <- tt %.% arrange(na, -nu) (i in 1:nrow(test2)) { if (i < nrow(test2)) { if (test2[i, ]$nu - 2 > test2[i+1, ]$nu) { test2[i, 4] <- "n" test2[i, 5] <- test2[i, ]$nu - test2[i+1, ]$nu } else if (test2[i, ]$nu - 2 <= test2[i+1, ]$nu) { test2[i, 4] <- "y" test2[i, 5]

c# - Is there a faster way for filtering in datatable? -

c# - Is there a faster way for filtering in datatable? - i have datatable contains 2.5m rows. filter rows in datatable. columns of datatable : [intcode] long [bdintcode] long [txndt] datetime [txnquantity] decimal [recorduser] long [recorddt] datetime my code below : foreach (var downwards in breakdowns) { sw.start(); var relatedbreakdowns = firstgroup.where(x => x.relatedbdintcode == down.processingrowintcode).tolist(); if (relatedbreakdowns.count == 0) continue; var filters = string.format("bdintcode in ({0})", string.join(",", relatedbreakdowns.select(x => x.bdintcode))); var filtereddatatable = datatable.select(filters, "bdintcode"); foreach (var datarow in filtereddatatable) { var r = datatableschema.newrow(); r["recorduser"] = recorduser;

ssl - Git unable to push after entering username and password -

ssl - Git unable to push after entering username and password - i have created github repo remotely , locally , assigned local repo remote repo. have added file locally , wanted upload file remote repo using command git push , got below error: fatal: unable access 'http://github.com/xxx/xxx.git/': ssl certificate problem: self signed certificate in certificate chain. after searching on web found should add together below command disable ssl verify using git config http.sslverify false and error gone. requesting username https://github.com , password, type both entries nil happen after that, if console freezes. git ssl github

xml - xslt for-each statement displaying duplicates -

xml - xslt for-each statement displaying duplicates - this xml: <root> ... <payment-schedule> <loan> <l-number id='0'>00321-123456789-01</l-number> <financed id='0'>2500.0000</financed> </loan> <loan> <l-number id='1'>00321-123456789-02</l-number> <financed id='1'>3000.0000</financed> </loan> </payment-schedule> </root> this xslt: <!--repeating rows displays loans--> <xsl:apply-templates select="loan"/> </xsl:template> <xsl:template match="loan"> <xsl:for-each select="/root/payment-schedule/loan"> <fo:table-row> <fo:table-c

asp.net mvc 4 - Error page not being used on exception -

asp.net mvc 4 - Error page not being used on exception - when exception thrown on mvc4 (.net) application, error page shown. my web.config file has <system.web> <customerrors mode="on" defaultredirect="~/error/" /> <compilation debug="true" targetframework="4.5" /> </system.web> but, in controller page, diving 0 (to test it). naturally, exception thrown not redirect me error controller. instead, page shows: sorry, error occurred while processing request. my errorcontroller is: public actionresult index() { homecoming view(); } and routes are public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.maproute( name: "default", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "i

Breeze Server 1.4.14 Nuget Package Bad? -

Breeze Server 1.4.14 Nuget Package Bad? - this first time utilize nuget, hold judgements, , wanted verify next issue bundle itself. in brand new visual studio 2013 update 2 web api project. using manage nuget packages dialog. installed breeze server - web api 2 (version 1.4.14) installed breeze server - context provider entity framework 6 (version 1.4.14) wrote simple breeze controller. build no go next error.. assembly 'breeze.webapi2, version=1.4.0.0, culture=neutral, publickeytoken=f6085f1a45e2ac59' uses 'system.web.http.odata, version=5.1.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' has higher version referenced assembly 'system.web.http.odata, version=5.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' c:\users\ccopelm2\documents\visual studio 2013\projects\breezenugettest\packages\breeze.server.webapi2.1.4.14\lib\breeze.webapi2.dll is broken bundle release? to clear, these packages installed (unless web api

json - Menu using AngularJS -

json - Menu using AngularJS - i need create menu using angularjs based on json file looks like: { "menu": [{ "id": "1", "name": "movies", "parent_id": "0" }, { "id": "2", "name": "trailers", "parent_id": "1" }, { "id": "3", "name": "action , adventure", "parent_id": "1" }, { "id": "4", "name": "animation", "parent_id": "3" }, { "id": "5", "name": "kids", "parent_id": "0" }] } the list should looks like: movies trailers action , adventure animation kids i don't know how create this, help great. please go throug

javascript - Include a JS file using jQuery and wait till it loaded -

javascript - Include a JS file using jQuery and wait till it loaded - this question has reply here: how synchronously load script directory via ajax call? 2 answers i want include scripts @ runtime , browser has wait till script loads or dependency resolves. try $.when( $.getscript( "sample.js" ), $.getscript( "simple.js" ), $.getscript( "jquery.js" ), $.deferred(function( deferred ){ $( deferred.resolve ); }) ).done(function(){ //place code here, scripts loaded }); javascript jquery

python - Concat, Groupby and sum() panda -

python - Concat, Groupby and sum() panda - i have timestamped ohlc info trying recreate uncompressed high-low dataframe iterating through original ohlc dataframe. ohlc dateframe looks this: open high low close index1 r1 tpo timestamp 2014-05-07 09:30:00 187.40 187.62 187.16 187.16 0 0.46 na 2014-05-07 10:00:00 186.96 187.32 186.13 186.18 1 1.19 na 2014-05-07 10:30:00 186.47 186.90 186.47 186.88 2 0.43 na 2014-05-07 11:00:00 186.78 186.97 186.67 186.68 3 0.30 na 2014-05-07 11:30:00 186.85 187.69 186.85 187.69 4 0.84 na the thought here recreate each bar in row , create dataframe of filled range. each row phone call function recreate filled range row i. works fine , creates , returns row dataframe in x1 or x2. next, want append, concatenate dataframe the 1 prior in cumulative concat function..it appears correctly

javascript - Using data from JSON files as references to data from other JSON files -

javascript - Using data from JSON files as references to data from other JSON files - i trying create website tabletop game friend of mine created, , want store info in json files , pull info in html files javascript. want to, example, store each class in separate file, skill list (only listing skill name , level learned in file) included in file, , master list of skills, costs, , descriptions in file. basically, want treat 2 or more json files linked tables in database. in example, found in class's file: { "name": "class 1", "skills": [ { "name": "skill 1", "level": 1 }, { "name": "skill 2", "level": 2 }, { "name": "skill 3", "level": 3 } ] } and maste

Python / Excel - Conditional cell printing with xlrd -

Python / Excel - Conditional cell printing with xlrd - i want print rows of specifig column, let's colmn b, far good: import xlrd file_location = "/home/myuser/excel.xls" workbook = xlrd.open_workbook(file_location) sheet = workbook.sheet_by_index(0) info = [[sheet.cell_value(r, c) c in range(sheet.ncols)] r in range(sheet.nrows)] r in data: print r[1] now want print out cell values, have yellowish colored background. found link failed adept code. help me out? if know specific color index of cells yellowish background, can check background.pattern_colour_index value of cell style. note of import pass formatting_info=true open_workbook() : import xlrd file_location = "/home/myuser/excel.xls" workbook = xlrd.open_workbook(file_location, formatting_info=true) sheet = workbook.sheet_by_index(0) row in range(sheet.nrows): cell = sheet.cell(row, 1) style = workbook.xf_list[cell.xf_index] color = style.background.pattern_c

.htaccess - htaccess redirect - subdomain with query ignored - subdomain only redirect to php -

.htaccess - htaccess redirect - subdomain with query ignored - subdomain only redirect to php - i want allow sudomains containing queries or requests ignored: e.g. http://sub.domain.com/documents or http://sub.domain.com/index.php?user=fred but if uri subdomain e.g. http://sub.domain.com if gets redirected http://sub.domain.com/portal.php how do using htaccess file ? put code in document_root/.htaccess file: rewriteengine on rewritecond %{query_string} ^$ rewritecond %{http_host} ^sub\.domain\.com$ [nc] rewriterule ^/?$ /portal.php [l] php .htaccess mod-rewrite redirect

Retrieving Image from Parse.com into Processing sketch -

Retrieving Image from Parse.com into Processing sketch - i want retrieve images parse.com database processing sketch. possible? start? can't find info it. from brief viewing of processing language, seems can phone call loadimage(url) . needed url of image, depend on language you're using access parse. for illustration in javascript: var url = parseobject.get('imageproperty').url(); parse.com processing

android - Error while opening my database -

android - Error while opening my database - whenever seek access database gives error. same code running in other apps. here code of database helper class... public class localdatabasehelper extends sqliteopenhelper{ private static final string tag = "localdatabasehelper"; public string db_path = "data/data/com.cybergeniesolutions.scentsysquirrel/databases/"; private static string db_name = "local.db"; public static final string key_rowid = "_id"; public static final string perfume_id = "perfume_id"; public static final string got_it = "got_it"; public static final string name = "name"; public static final string phone = "phone"; public static final string website = "website"; public static final string facebook = "facebook"; public static final string rating = "rating"; public static final string my_choices ="my_choices"; public static final string ratin

java - Android (eclipse) image button vs background image -

java - Android (eclipse) image button vs background image - i'm trying figure out best use. i'm trying develop simple game , designing starting activity. start game plan have start button. want utilize custom design though. my question is, should utilize imagebutton (which believe imported image can click on, or textview android:background="@drawable/imagename" . both seem allow onclick if i'm not mistaken what's pros , or 1 on other? hope isn't duplicate question, found info on how upload images don't need. need know advantages using 1 versus other. also, onclick textview apply background or text? i think imagebutton maybe better. because must have click effect feedback . if utilize background image ,you have write selector.xml alter click , unclick effects. so, think imagebutton may better. java android eclipse

How to open a child Window like a splash screen before MainWindow in WPF? -

How to open a child Window like a splash screen before MainWindow in WPF? - i have 2 xaml. 1 mainwindow , other newwindow. want show newwindow 5 seconds, when programme run. , after 5 seconds, want show mainwindow. how alter xaml in wpf? here mainwindow. <window x:class="wpfapplication2.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="350" width="525"> <grid> </grid> public partial class mainwindow : window { public mainwindow() { initializecomponent(); } } here newwindow. <window x:class="wpfapplication2.newwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="newwindow" height="300" width="3

email - IMAP IDLE method (ruby) always fires including archive / deletion events for Gmail servers -

email - IMAP IDLE method (ruby) always fires including archive / deletion events for Gmail servers - i've specified resp.name == "exist" , untaggedresponse. want idle fire when receive new messages folder. according documentation, should work whatever reason, it's firing whenever message archived or deleted. @imap.examine 'inbox' # add together handler. @imap.add_response_handler |resp| if resp.kind_of?(net::imap::untaggedresponse) , resp.name == "exists" # fires archives , deletions... end end any thoughts? the exists number increment when new mail service arrives , decrease when mail service moved mailbox, have maintain track of number disambiguate. or can ok [uidnext n] instead, should reported new mail. ruby email gmail imap messages

String matching and replace in Java -

String matching and replace in Java - i have string this: string = "barbara liskov (born barbara jane huberman on nov 7, 1939" +" in california) computer scientist.[2] ford" +" professor of engineering science in mit school of engineering's electrical" +" engineering science , computer science section , institute professor" +" @ massachusetts institute of technology.[3]"; i replace of these elements: [1] , [2] , [3] , etcetera, blank space. i tried with: if (a.matches("([){1}\\d(]){1}")) { = a.replace(""); } but not work! your pattern wrong. try example: string input = "barbara liskov (born barbara jane huberman on nov 7, 1939 in california) " + "is computer scientist.[2] ford professor of engineering science " + "in mit school of engineering's electrical engineering science , computer " + "science section , inst

PHP composer autoload not loading class -

PHP composer autoload not loading class - i'm getting started using composer dependency management , i'm having hard time figuring out how i'm not adhering psr-4 autoloading i'm here advice. i've got class generates random values on packagist. project construction next (i've labeled composer.json files , b): project dir |classfile.php |composer.json |vendor |autoload.php |ejfrancis |php-random-value b |composer.json |randomvalue.php <--the class want autoloaded composer.json a { "require": { "ejfrancis/php-random-value": "dev-master" } } composer.json b { "name": "ejfrancis/php-random-value", "description": "secure random value generator.", "require": { "php": ">=5.3.0" }, "license": "mit", "autoload": {

Mclust (R) equivalent package in Python -

Mclust (R) equivalent package in Python - is there mclust equivalent command or mclust equivalent bundle in python? searched documentation sklearn . has gmm classification, not clustering. have installed rpy2 , not sure how install mclust bundle in r python. scilearn-kit has lot of machine learning goodies packed 1 package. tools regression, classification , clustering too. don't know if covers of mclust utilities should come pretty close . have @ has offer here : http://scikit-learn.org python r python-2.7 machine-learning

html - Targeting an element with CSS -

html - Targeting an element with CSS - i've had around , have found many different ways target element, none im looking do. basically, want toggle display of <section> using checkbox input. my html code is... <li><input type="checkbox" class="toggle" id="contacttog"><label for="contacttog">contact</label></li> </ul> </nav> </header> </div> <div style="clear:both"></div> <section class="hiddencontact" id="hiddencontact"></section> so want utilize input toggle .hiddencontact any help appreciated. know can utilize js this. i've tried.. input.toggle { display: none; } input.toggle + .hiddencontact { height: 200px; margin: .2rem; overflow: hidden; } input.toggle:checked .hiddencontact { display: block; min-height: 200px; } to no avail, html css

ExtraTreeRegressor in scikit-learn (Python) -

ExtraTreeRegressor in scikit-learn (Python) - i have 2 questions on extratreeregressor in scikit-learn (python). 1) why not possible increment number of features above dimension of input space? algorithm in [1] not restrict number of maximum features. in cases selection higher max_feature can result in improve results. 2) want utilize extratreeregressor implementation of fitted q-iteration, execute extratreeregressor within loop (96 timesteps). first, set max_features 1 , plotted mse after ever iteration (upper graph). increased max_features dimension of input space ('auto') , plotted mse. why mse increases in lastly case? we expect mse smaller larger value of max_features... ![the upper graph shows mse within loop max features set 1, lower graph shows mse within loop max_features set 'auto'][1] figure: http://imgur.com/aqgcveu [1] p. geurts, d. ernst., , l. wehenkel, "extremely randomized trees", machine learning, 63(1), 3-42, 2006.

sql - BOF - EOF error -

sql - BOF - EOF error - i'm getting error asp page when seek run sql query: adodb.recordset error '800a0bcd' either bof or eof true, or current record has been deleted. requested operation requires current record. the code is: ' -- connect database1.accdb database -- set conn1 = server.createobject("adodb.connection") conn1.open "provider = microsoft.ace.oledb.12.0;data source = c:\users\nam2611\documents\my web sites\website1\database3.accdb" ' -- product recordset -- set rs1 = server.createobject("adodb.recordset") rs1.open "select * product p_code 'ap'", conn1 x = "<table border = 1 width= 1000><tr><th>code<th>product name<th>type<th>price</tr>" response.write x ' -- create table entries each pupil -- rs1.movefirst while not rs1.eof x = "<tr><td>" & rs1("p_code") & "<td>"

python - Using Bootstrap's WTF Quick Forms without its CSS -

python - Using Bootstrap's WTF Quick Forms without its CSS - i'm writing web app flask , i've made css template i'm happy with. want utilize wtf.quick_form() feature bootstrap, can't load bootstrap without overriding own css. want load quick_form() feature. what's best way go this? well, there's previous question covers topic of using custom css, but, honestly, if you're wanting utilize bootstrap quick_form() , don't have go through of that. let's have base.html file: <!doctype html> {% extends "bootstrap/base.html" %} {% import "bootstrap/wtf.html" wtf %} {% block styles %} {{ super() }} <link rel="stylesheet" href="{{url_for('static', filename='style.css')}}"> {% endblock %} it's suggested elsewhere load 'style.css' file after load 'bootstrap.css' file, can away simple link rel 'style'.css' if want load quick.f

android - ActionBar with tabs, crash when I push tab with WebView -

android - ActionBar with tabs, crash when I push tab with WebView - i have created tabs in mainactivity. tabs declared correctly, , loaded perfectly. next these tabs, programme stops. webview declared in fragment1.xml public class fragmentstab1 extends fragment implements actionbar.tablistener { private fragment mfragment; webview navegador1; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); // view fragment1.xml getactivity().setcontentview(r.layout.fragment1); try{ navegador1 = (webview) getview().findviewbyid(r.id.webkit1); websettings websettings = navegador1.getsettings(); websettings.setjavascriptenabled(true); websettings.setsaveformdata(false); navegador1.loadurl("http://www.google.com"); } grab (exception e) { e.printstacktrace(); } navegador1.setwe