Posts

Showing posts from June, 2014

ruby on rails - Devise not generating paths (rake routes shows everything as expected) -

i have rails app devise / omniauth , paths devise not being recognized reason. when use example "app_user_omniauth_authorize_path(:facebook)" undefined method error. same other paths.. rake routes returns this: dev_section post /dev_section(.:format) custom_actions#dev_section new_app_user_session /app_users/sign_in(.:format) devise/sessions#new app_user_session post /app_users/sign_in(.:format) devise/sessions#create destroy_app_user_session delete /app_users/sign_out(.:format) devise/sessions#destroy app_user_omniauth_authorize get|post /app_users/auth/:provider(.:format) app_users/omniauth_callbacks#passthru {:provider=>/facebook|twitter|google_oauth2/} app_user_omniauth_callback get|post /app_users/auth/:action/callback(.:format) app_users/omniauth_callbacks#(?-mix:facebook|twitter|google_oauth2) app_user_password post /app_us

php - Base64 encoding error -

the image not showing upon clicking upload button, base64 encoding error. the browser displaying binary codes. $showimage = "images/".$_files['image']["name"]; $show = new imagick( $showimage ); $points = array( 0,0, 0,0, # top left 213,0, 213,20, # top right 213,160, 213,110, # bottom right 0,160, 0,160,# bottum left ); $show->setimagebackgroundcolor("#ffffff"); $show->setimagevirtualpixelmethod( imagick::virtualpixelmethod_background ); $show->distortimage( imagick::distortion_perspective, $points, true ); echo "<img src='$show'>"; ?> try: $imagedata = base64_encode($show->getimageblob); echo "<img src='data:image/png;base64,$imagedata'>";

augmented reality - Another AR SDK like GART SDK on Windows Phone -

i'm developing windows phone 8 application gart sdk . but don't because overlaps places' names , has same font size. using artoolkit iphone , changes font size places near or far, , doesn't overlap them. do know sdk gart windows phone 8? i encountered same problem while ago, , solved modifying onattitudechanged method of worldview class. this code have inside else block of method: else { // in range show wvitem.visibility = visibility.visible; // create compositetransform position , scale worldviewitem compositetransform ct = new compositetransform(); // offset half of worldviewitems size center on point ct.translatex = projected.x - (wvitem.actualwidth / 2); ct.translatey = projected.y - (wvitem.actualheight / 2); // scale should 100% @ near clipping plane , 10% @ far clipping plane //double scale = (double)(mathhelper.lerp(0.1f, 1.0f, (farclippingplane - math.abs(aritem.worldlocation.z)) / farclippingplan

jquery - Javascript code is not working inside the spring jsp -

i biginner in spring , need display in spring using jquery.i have imported necessary jquery plugins.but problem javascript code not working inside jsp.i have tested using alert statement , other thing,but none of them work.i don't know do.below jsp code index.jsp: <%@ page language="java" contenttype="text/html; charset=utf-8" pageencoding="utf-8"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4 /loose.dtd"> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title id="description">in demo jqxtree built json data.</title> <spring:url value="/resources/jqx.css" var="jqueryurl" /> <link rel="stylesheet" href="${jqueryurl}" type="text/

windows phone 8 - Notification on Lock Screen triggered by (remote) Push Notification? -

Image
is possible display on windows phone lock screen triggered push notification? according graphic, understand that's it's possible via local notifications, or getting wrong? app make notifications on lock screen whenever important happens, triggered via remote push notifications server - possible? ( image taken here ) actually, possible. lock screen reflects information of main pinned tile of app. so, if update tile, example sending tile push notification, lock screen updated too. note, cannot programatically set app show notifications in lock screen. user has manually select it. you may find post useful: http://www.silverlightshow.net/items/windows-phone-8-live-tiles-and-lock-screen.aspx

jquery - echo HTML in php -

before asked question went through how echo in php, html tags couldn't come solution. i'm trying echo html in php. using codeigniter framework. when select category want load view using ajax request. using jquery send request , load page inside div. works when use php doesn't give me proper output. wrote following code: echo '<a href="google.com"><img src="newone.jpg" /></a>'; it produces output "</a>" double quotation. this jquery code: jquery(document).ready(function(){ jquery("#category").change(function(){ jquery.ajax({ type : "post", url : "controller_list/get_images", data : "categoryid="+jquery("#category").val(), datatype: "html", success : function(msg) { jquery("div").find("#img_list").html(msg); }

html - Jquery offset shows values relative to fixed parent instead of page -

i'm having issues getting offset of object contained in fixed parent. understand using object.offset() give position relative whole document, when put object in fixed container, returns offset relative screen you're on. i'm trying display object @ position relative first - if you're @ top of page, it'll fine, if you've scrolled down won't. i've found when using jquery dialog, have been able replicate on regular objects well. is expected behavior? if so, there way find position of object relative document when contained in fixed parent? huh, did follow here - wasn't able replicate in jsfiddle. whatever problem seems specific own environment. guess i'll keep bashing , see if can find what's causing issue.

broadcast - why android.net.conn.CONNECTIVITY_CHANGE register in manifest don't work at first time? -

i want listen network status,i use broadcast , register in androidmanifest.xml。but can't receive broadcast after app start. test in samsung s3 , nexus 5 , xiaomi,that happen.i know register in manifest static mode,if register in app code(dynamic mode) that's ok,who can tell why,is android bug? <receiver android:name="com.l555iu.receiver.myreceiver"> <intent-filter> <action android:name="android.net.conn.connectivity_change"/> </intent-filter> </receiver> do add permision access_network_state? add 1 on manifest this working on nexus 5

bayesian - Android Spam Detection Application? -

i developing spam detection application android,i using bayesian classification detecting spam messages. want know whether should use training set of 50 ham messages , 50 spam messages or whether should user based content training? effect have on effectiveness of application? know might broad discussion precise answer, not discussion here. it looks you'll need thousands of training messages. note spammers have discovered ways past kind of filter, e.g. mispellings "v1agra". iterative refinements classifier might catch current techniques. bayesian_spam_filtering looks place start, esp. references in-depth articles.

database connection - how to connect crystal reports with visual fox pro -

i ask how connect crystal report visual fox pro. in connecting mean crystal report having connect directly visual fox pro .dbf without coding on visual fox pro. is there step on how connect stored procedures in sql server? i know how connect crystal reports sql server, don't know how connect crystal reports visual fox pro .dbf maybe simple question you. kindly understanding sirs. in advance sirs , mams! i've done few times, depends on version of crystal reports. in more recent version, in database expert > create new connection > ole db(ado) > make new connection now, on screen appears, select microsoft jet 4.0 oledb provider , click next for database name, want folder file resides in, not whole path . finally, select table want use , proceed other data source.

ruby on rails - inject url into background-image -

@media #{$only-small} { .beverages--element .inner:before{ background-image: url(....); background-repeat: no-repeat; } } i have piece of code, used style box show beverage in list of beverages. so far good, until i've used same image beverages. need extend logic, each beverage has different image. image stored in cloud service , have it's link in database beverages stored. how can pass link view css? thanks one option have set background image inline, in html. so: <div style="background-image:(...)">mydiv</div>

css - Missing span element -

i have problem span element in ie (currently tested against ie9 , ie10). when open f12 developer tools , select span element can't find on screen. however, if manually assign background-color other transparent or inherit shown @ expected place. the problem is, span element used alignment element popup, since element missing, popup incorrectly aligned. i wasn't able observe behavior in jsfiddle , yet. , can't test in other browsers. here how significant markup looks like: <div id="div1"> <div id="div2"> <span> <input id="in" value="somename"></input> <label for="in">person surname:</label> </span> </div> </div> and corresponding css shown in developer tools (except background-color attributes): #div1 { background-color: grey; cursor: auto; font-family: thoma, verdana, helvetica, san

gnu make - Linking libraries in makefile -

i have following make file executable := sub ccfiles := subfilhost.cpp include ../../common/common_opencl.mk i want include 3 libraries in make file name libpng.a,libpng16.a , libz.a. how should write them in make file them included. libraries in same place of source files of now. the file here common_opencl.mk i see no direct way influence behavior common_opencl.mk defines. however, can redefine linking target own, e.g.: executable := sub ccfiles := subfilhost.cpp include ../../common/common_opencl.mk extralibs:=libpng.a libz.a $(target): makedirectories $(objs) makefile $(verbose)$(linkline) $(extralibs) (this full makefile example)

c# - convert List<T> 's one property to comma separated item -

my database return value below: a b c d tes t 1 ard tes t 1 blk tes t 1 fle tes t 1 hen tes t 1 riv i have change below: tes t 1 ard,riv,blk,fle,hen,riv using c#. c# class above result entity: public class entity { public string a{get; set;} public string b{get; set;} public string c{get; set;} public string d{get; set;} } since i'm using more 1 database server ms sql,oracle,my sql don write query each. example: in ms sql have stuff , xml method acheieve this. group entities composite key { a, b, c } , create concatenated d value items in group: var result = e in entities // entities in-memory list group e new { e.a, e.b, e.c } g select new entity { = g.key.a, b = g.key.b, c = g.key.c, d = string.join(",", g.select(e => e.d)) }; you can move quer

android - onitemclick() of listview not working in navigation drawer -

i building navigation drawer in when 1 item clicked opens new activity in musicplayer. problem listview created , items listed in it. on itemclick nothing happens. below's code: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.audioedit); mtitle = mdrawertitle = gettitle(); // load slide menu items navmenutitles = getresources().getstringarray(r.array.nav_drawer_items); // nav drawer icons resources navmenuicons = getresources() .obtaintypedarray(r.array.nav_drawer_icons); mdrawerlayout = (drawerlayout) findviewbyid(r.id.drawer_layout); mdrawerlist = (listview) findviewbyid(r.id.list_slidermenu); navdraweritems = new arraylist<navdraweritem>(); // adding nav drawer items array // home navdraweritems.add(new navdraweritem(navmenutitles[0], navmenuicons.getresourceid(0, -1))); // find people navdraweritems.add(new navd

unix - script for removing files that are 1 hour old -

this question has answer here: how delete files older x hours 7 answers i need shell script runs every half hour on cron , removes files extension (*.arc) 1 hour , old tried mtime has option days old not in terms of hours it helpful if can command or logic can run on types of os meaning (hp-ux,linux,rhel etc) edit:(some of servers in work environment have os dont have mmin option there work around) can please tell how wud use tmpwatch or temreaper delete files (*.arc) older 1 hr thank you maybe can you how delete files older x hours seems wanting do! edit! maybe considerd kind of hack, maybe code this touch -t 03061000 /tmp/datefile this supposed create file time stamp of march 6th 10:00 next can issue command find . -newer /tmp/datefile -print to find files thare newer file , remove them. hope helps!

function - Haskell - lambda expression -

i trying understand what's useful , how use lambda expression in haskell. don't understand advantage of using lambda expression on convention way of defining functions. example, following: let add x y = x+y and can call add 5 6 and result of 11 know can following: let add = \x->(\y-> x+y) and same result. mentioned before, don't understand purpose of using lambda expression. also, typed following code (a nameless function?) prelude , gave me error message. let \x -> (\y->x+y) parse error (possibly incorrect indentation or mismatched backets) thank in advance! many haskell functions "higher-order functions", i.e., expect other functions parameters. often, functions want pass such higher-order function used once in program, @ particular point. it's more convenient use lambda expression define new local function purpose. here's example filters numbers greater ten given list: ghci> filter (\ x -> x &&

can not get output of shell script's echo to a Java variable -

i calling shell script java, in shell script running queries , getting running times,(e.g. when save echo time's result in output file, e.g. 28sec 27sec 34sec in 1 column) can not output of echo time java,when running program getting weird decimal numbers. code getting output shell script this: import java.util.*; import java.io.*; public class test { public static void main(string[] args) { treemap <string, long> mymap = new treemap <string, long>(); string output = ""; string line = ""; mymap.put("key", value); mymap.put("key", value); list<string> cmdlist = new arraylist<string>(); cmdlist.add("/path/to/the/test/file/test.sh"); for(map.entry entry : mymap.entryset()) { cmdlist.add(entry.getkey().tostring()); cmdlist.add(entry.getvalue().tostring());

r - Date format in SAS -

i have sas code need convert r. my sas code - proc sql; create table data select a.*,b.qty sales inner join units b on a.id=b.id , put(a.date,yymmn6.)=put(c.date,yymmn6.) quit; i know put(a.date,yymmn6.) converts date sas date value. a.date become after function? if date=01jan2012, put(a.date,yymmn6.) makes sas value represents 201201 or 20120101? i.e. sas value created stand whole date or year , mon of date? currently, writing r code - data <- sqldf("select a.*,b.qty sales inner join units b on a.id=b.id , a.date=c.date") should doing - sales$date <- as.yearmon(sales$date) units$date <- as.yearmon(units$date) data <- sqldf("select a.*,b.qty sales inner join units b on a.id=b.id , a.date=c.date") i don't have access sas , hence, cannot try out on sample data. great. thanks! put(a.date,yymmn6.) converts numeric date value character value stored yyyymm (e.g. 201201). therefore join condition matching date

c# - How to connect remote database in asp.net using mysql? -

protected void button1_click(object sender, eventargs e) { try { string myconstring = "server=http://10.54.3.208:8080/ager/person;" + "database=agero;" + "uid=root;" + "password=root;"; mysqlconnection con = new mysqlconnection(myconstring); //mysqlconnection command = con.createcommand(); con.open(); string s = "select * boopathi stu_id =@sid , stu_pwd =@pwd"; mysqlcommand cmd = new mysqlcommand(s, con); cmd.parameters.addwithvalue("@sid", textbox1.text.tostring()); cmd.parameters.addwithvalue("@pwd", textbox2.text.tostring()); cmd.executenonquery(); mysqldatareader dr = cmd.executereader(); while (dr.read()) { if (dr.hasrows == true) { server.transfer("webform1.aspx"); } } //close connection con.close(); } cat

apache - mod_rewrite and dot at END of URI -

i have been developing shop, uses mod_rewrite allow make uris more readable, instance: http://www.example.com/shop/tools will rewritten to http://www.example.com/index.php?area=shop&folder=tools my rewrite rule follows: rewriterule ^shop/([^?#]+) index.php?area=shop&folder=$1 [nc,qsa,l] however, breaks when folder name ends in . (dot), discovered when testing folder name ending in "etc." it seems trailing dots totally removed before $_get has been populated. if put character after dot, it's fine, if uri ends in number of dots, removed is there way stop happening? you don't need exclude "?" , "#" in rewriterule since operates on uri (path), without query-string or anchor. so, enough: rewriterule ^shop/(.+) index.php?area=shop&folder=$1 [nc,qsa,l] that being said, not change fact dots stripped. this may result of multiviews being on. option makes apache try , resolve uris disregarding extensions.

pygame - python display a character at a time -

so i'm recreating part of pokemon yellow (trying make close original possible) , 2 days i'm searching smart , efficient way render , display string 1 character @ time in textbox, pokemon games!(by way i'm using pygame , python). know way of achieving this? i've tried many things when rendering 1 character @ time, there inadequate space between them. sorry long question! cheers, alex (edit) interest guys!!! i'm not sure if know correct way display code here, if should copy paste in here or upload in dropbox or somewhere else.. (edit2) clarify, use font @ size 28, way i'm trying render characters right now, make list every element has format (character_to_render,x_pos_to_render,y_pos_to_render). next character (character2_to_render, x_pos_to_render + 28 ,y_pos_to_render). approaching problem way, leaves inadequate space between characters , others fine. (edit 3) : answers guys ! after closely observing emulator, noticed inadequate spacing between rendere

android - Eclipse not detecting my Galaxy S3 GT-I9305 in list of devices -

i know question has been asked numerous times, none of threads have had answer solve problem. seems no matter try eclipse wont detect phone, have set debug mode in settings, i've installed "kies 3" on laptop , says have latest drivers installed on phone when try update it. i've installed google usb driver package sdk manager , have downloaded , installed samsung driver samsung website. windows recognizes device , in device manager under android phone appears "samsung android adb inerface". im running windows 7 , have tried deleting mounted dive drivers regedit seen suggested in thread still no joy! starting frustrated @ stage i've been trying 2 days figure out! this such pain! need able debug on phone i'm using features emulator can't handle (i.e. audio recording). i'm out of ideas here appreciated! thanks the method followed install gt-i9300 drivers this: download samsung drivers link: http://developer.samsung.com/andr

.net - While I am filling combobox with observable collection from wcf service i am getting following Exception -

while trying fill combobox observable collection consumed wcf service getting following exception.can please me cannot create instance of 'mainwindow' defined in assembly 'schoolmanagementsystem, version=1.0.0.0, culture=neutral, publickeytoken=null'. exception has been thrown target of invocation. error in markup file 'mainwindow.xaml' line 1 position 9. mainwindow.xaml.cs: public partial class mainwindow : window { public mainwindow() { initializecomponent(); servicereference1.service1client classlist = new servicereference1.service1client(); observablecollection<classdo> objclasslist = new observablecollection<classdo>(classlist.getclasslist()); // cmbclass.itemssource = objclasslist; // cmbclass.displaymemberpath = "classid"; //cmbclass.selectedvaluepath = "classname"; } } mainwindow.xaml <window x:cl

Python MySQLdb Insert TypeError: not all arguments converted during string formatting -

i trying insert values database urls =("http://www.**********.net/?page=match") hdr = {'user-agent': 'mozilla/5.0'} req = urllib2.request(urls,headers=hdr) page = urllib2.urlopen(req) soup = beautifulsoup(page) tournament = soup.find('div',{'class':['content-body']}) match_times = tournament.find_all("div", style = "width:10%; float:left;") match_names = tournament.find_all("div", style = "width:46%; float:left; margin-left:2%; margin-right:2%") tournys = tournament.find_all("div", style = "width:40%; float:left; overflow:hidden;") element in zip(match_times, match_names, tournys): results = element[0].text, element[1].text, element[2].text matchday=datetime.strptime(results[0], "%d/%m/%y").strftime("%d-%m-%y") info= results[1],results[2],matchday conn= mysqldb.connect(host='localhost',user='root',passwd='',d

c# - WebService based on an interface for mocking -

question background: i have 2 separate projects. 1 consists of class , test project, other web service. want implement mocking against web service. question: i have web reference web service called 'webservice' being consumed class 'proxyhandler', shown: private webservice _webserviceobject public proxyhandler(webservice webserviceobject) { _webservice = webserviceobject; } the web service class implements interface, shown public class webserviceclass:iwebservice which implementation?: can web reference of type 'iwebservice'? or, need implement new class based on interface consumes webservice, class implemented proxy? allow me mock against interface, shown: modified proxy class: private webservice _webservicehandlerobject; public proxyhandler(iwebservicehandler webservicehandlerobject) { _webservicehandlerobject = webservicehandlerobject; } added 'webservicehandlerobject: private webservice

javascript - Return signed document or link to signed document in docusignapi after signing process completion -

i'm able login , embedded signing view return url given user can review document , sign on it. we've got url, user signed , redirected our application's home page. how can user see signed document. i wanted send email both user , owner after signing process completion access credentials or url see whether document has been signed or not.(i know owner receive email link , subject says user has viewed document) but how can user(who signed document) see signed document (may silly or dumb question i'm not able find-out way) i'm using embeded signing(rest v2). generally in pattern/use case have email notifications turned off embedded signers , use. there couple ways signer signed document: you can turn notifications on completion on if wish send completion email signer. can review guide assist in right setting https://www.docusign.com/support/how-to-guides/sending-and-signing-options create docusign connect listener , have docusign connect send li

sql - Syntax Error MS-Access query in VB (but not in Ms Access) -

i trying create table programmatically through visual basic (visual basic studio 2008 .net framework 3.5) ms-access database. i using following syntax: create table datosftp ( id autoincrement, direccion text, usuario varchar(30), password varchar(30), passwordbd text, primary key(id) ) but launchs me following exception: "syntax error in field definition" however, if execute query in ms access (the program), works perfectly. does know can be? thanks in advance. password reserved word. try this create table datosftp ( id autoincrement, direccion text, usuario varchar(30), [password] varchar(30), passwordbd text, primary key(id) ) reserved words

jquery - Disable CSS transitions on page load only -

i have div styled have smooth transitions on background-color when hovered. div displayed in many pages (including homepage) in homepage has different background-color. div { border:1px solid; background-color:#fff; display:inline-block; width:100%; height:100px; -webkit-transition: 0.5s; -moz-transition: 0.5s; -o-transition: 0.5s; transition: 0.5s; } div.homepage { background-color:#777; } div:hover, div.homepage:hover { background-color:#f00; } since div included php snippet on each page, idea (to keep code clean) output generic div php , add "homepage" class on homepage only, via jquery. $('div').addclass("homepage"); unfortunately, causes undesired transition on page load (see fiddle , sake of clarity click "run" after loading). how can disable css transitions on page load only, without affecting normal behaviour (when div hovered)? this worked me: http://css-tri

mysql - run php script in background centos server -

i want php file run in background. when googled found exec() used run in background. using cent os server. in order use exec basic things should install. don't know how run in terminal. steps should follow run php script in background using exec(). i found ex on google dont know use in $cmd. function execinbackground($cmd) { if (substr(php_uname(), 0, 7) == "windows"){ pclose(popen("start /b ". $cmd, "r")); } else { exec($cmd . " > /dev/null &"); } } you can use nohup in terminal: nohup php my-file.php your php script keep running after logout. the other option screen . screen -a -m -d -s whatever ./phplauncher.sh

javascript - How to cross check if data is present in the database using ajax method? -

this javascript code checks validation of mobile number data (with other data) , forwards validate_user.php stores mobile number. want store data of users mobile number exists in table or else want display error message saying 'user not present in database' . i need help. do? thanks in advance. javascript $(document).ready(function() { $("#user_submit_form").submit(function() { var user_data = $("#user_submit_form").serialize(); var mobile = new array(); mobile = $('#mobile').val().split(""); if (mobile.length != 10 || !(mobile[0] == 7 || mobile[0] == 8 || mobile[0] == 9)) { alert('please enter valid mobile number'); } else { $.ajax({ type: "post", url: "validate_user.php", data: user_data, datatype: "json", }); // end ajax method alert

html5 template not working on internet explorer how to solve it -

i new in web designing , have started make own templates in html 5. today made template in html5 working chrome , firefox not working internet explorer(tested on ie 8). how can solve problem? i recommend neovov's polyfill: https://github.com/neovov/template-element-polyfill nb: there's bug in ie 11: moves <template> under <body> element before rendering dom! parentnode attribute wrong, , nesting fail. can see in [f12] tool.

oop - Function overloading with the only change in "uint32_t" & uint64_t" in pure virtual function in c++ -

i've pair pure virtual function defined inside c++ class, i've overloaded. code snippet below:: virtual uint64_t abc::getvalue()=0; virtual uint32_t abc::getvalue()=0; here, difference in function signature return type of getval() " uint32_t " & " uint64_t ".. it's throwing compilation error can't overloaded. plz me on this. you can't overload based on return type, on parameter types. because overload chosen based on how function called, , function call doesn't specify expected return type. options include: give functions different names; "return" value via reference parameter, rather return value; add dummy parameter, different type each version, specify return type; return "proxy" object that's convertible either type (although means you'll have single function, derived classes can't override 2 versions separately).

asp.net - Telerik Javascript error on unload page -

i using telerik controls in asp.net web application. facing javascript error on unload page: unable set value of property '_events': object null or undefined i facing issue when have merged/combined asp.net website mvc4. have searched on google unable find solution. edit: i found problem: when radcombobox empty error occurred. radcombobox load data @ runtime (when user clicks on it). any solution this? which telerik controls using? version? if using ajaxcontroltoolkit in same project, try removing (delete assembly , reference, rebuild) , see if helps.

java - Increased cost of a volatile write over a nonvolatile write -

i've been reading volatile ( https://www.ibm.com/developerworks/java/library/j-jtp06197/ ) , came across bit says volatile write more expensive nonvolatile write. i can understand there increased cost associated volatile write given volatile way of synchronization want know how how volatile write more expensive nonvolatile write; perhaps have visibility across different thread stacks @ time @ volatile write made? here's why, according article have indicated: volatile writes considerably more expensive nonvolatile writes because of memory fencing required guarantee visibility still cheaper lock acquisition. [...] volatile reads cheap -- cheap nonvolatile reads and is, of course, true: memory fence operations bound writing , reads execute same way regardless of whether underlying variable volatile or not. however, volatile in java more volatile vs. nonvolatile memory read. in fact, in essence has nothing distinction: difference in concurrent seman

windows - How to access an Orchard multi-tenant site externally on the same network -

i've got multi tenancy set on windows 7 machine using orchard 7.1 , iis 6.1 can access locally no problem. they relevant sites added within bindings of applicationhost.config file, computers' host file , therefore show should accessing url. i have had single tenant set on machine meant access on network, done adding site iis binding localhost/my ip address etc. however issue having how access these sites via mobile device/another computer (on same network) have set multiple tenants. any appreciated liam you'd need sort of naming service inside network, bonjour. short of that, guess you'd have configure other machines 1 one hosts files point server. one final possible possibility may use dns. there no reason why couldn't use domain control map several names local addresses such of server.

powershell - How to install test command line -

i'm trying use test command, not exists in system (windows 8). test -d $(build) how can install it? @echo off if exist mydirname ( echo mydirname exists ) else ( mkdir mydirname && echo mydirname created) source => here

web - Does Ejabberd only support chat functionality or can i extend it to support my whole website hosted on apache server -

i planning build social networking website facebook supporting chat functionality . want implement chat functionality through ejabberd server . rest of features implemented in apache server . i not sure whether need extend ejabberd server , port website apache server ejabberd server or find way connect apache server ejabberd server in case of chat request . if connect apache server ejabberd server should go default mnesia database or mysql. there's no need apache know ejabberd's database — why should it? instead, code website , hook ejabberd provide chat functionality using bosh (for instance, via strophe.js or other. "full-blown" web chat clients exist — there hordes of them (plus search web). there will problem of user authentication/registration can either have transient users (if unly need public chats (rooms) or make ejabberd use same mysql database website engine uses — ejabberd can that . solution enable external authentication in eja

Nunit unit test for WPF application gives NullReference exception -

while writing unit test(nunit) wpf application. got error 'object reference not set instance' at bottom level can see line raise exception application.current.dispatcher.invoke(dispatcherpriority.send, new action(() => loc.resolvelocalizedvalue(out ui))); this code used in helper class library. in advance. guys please suggest how can resolve this. application.current null in case. returns application object current appdomain gets set when application run. test cases test business logic i.e. test viewmodel layer. code want test should not contain reference ui component. more details can found here - application.current null in unit test cases . workaround provided in link discourage use of application.current in testcases or usage of in viewmodel layer needs unit tested.

objective c - Sprite Kit: How to pass scores between different scene? -

i stuck trying pass score between 2 scenes, myscene, , mymenu. game part score changes declared _score(nsinteger), , label _scorelabelnode(sklabelnode) code used initalize label, , create label holds score in myscene is _score = 0; _scorelabelnode = sklabelnode labelnodewithfontnamed:@"markerfelt-wide; _scorelabelnode.position =cgpointmake (cgrectgetmidx(self.frame), 3 *self.frame.size.height /4); _scorelabelnode.zposition = 100; _scorelabelnode.text = [nsstring stringwithformat:@"%d",_score]; _scorelabelnode.fontcolor =[uicolor blackcolor]; [self addchild:_scorelabelnode] so guess question is, how transfer score between 2 scenes when score needs change in myscene, , needs show score user got in mymenu. in advance. ps:i'm learning code appreciate detailed response use nsuserdefaults in myscene: nsuserdefaults *prefs = [nsuserdefaults standarduserdefaults]; [prefs setinteger:_score forkey:@"score"]; and in mymenu: nsuserdefaults *pre

javascript - modernizr no-js class does not work -

let first experience here on stackoverflow , first question. went old skool html html5, after research learned modernizr. i made head : <!doctype html> <!--[if ie 6]> <html class="no-js" id="ie ie6" <?php language_attributes(); ?>> <![endif]--> <!--[if ie 7]> <html class="no-js" id="ie ie7" <?php language_attributes(); ?>> <![endif]--> <!--[if ie 8]> <html class="no-js"id="ie ie8" <?php language_attributes(); ?>> <![endif]--> <!--[if !(ie 6) | !(ie 7) | !(ie 8) ]><!--> <html class="no-js" <?php language_attributes(); ?>> <!--<![endif]--> <head> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-s

python - Curve fitting - monotonically increasing derivative -

i trying physical significant fit experimental data. know not y values increase monotonically x dy/dx increase monotonically. have tried number of fitting functions including polynomial fit , univariate spline neither of these has allowed me produce fit looking for. so, i'm looking curve fitting function (in scipy?) allow me define known constraints of final curve. below example of data, fitted line not display monotonically increasing derivative. import numpy np import matplotlib.pyplot plt data = np.array([[ 6.30991828, -10.22329935], [ 6.30991828, -10.2127338 ], [ 6.47697236, -10.01359361], [ 6.47697236, -9.89353722], [ 6.47697236, -9.81708052], [ 6.55108034, -9.42113403], [ 6.55108034, -9.21932801], [ 6.58617165, -8.40428977], [ 6.62007321, -7.6500927 ]]) interp = np.linspace(min(data[:,0]), max(data[:,0]), 20)

excel - Sumif Function involving dates and text -

i have 3 columns contain range of dates, ie 6/15/2013, corresponding items ie. gravel, asphalt etc , corresponding tonnages. need able sum of tonnages of asphalt per month. i have tried several sumif statements coming no value. going fine until tried add sorting month "if" statement. any appreciated. sample data below column | column b | column c 6/23/2013| asphalt | 12 7/14/2013| asphalt | 14 6/15/2013| gravel | 15 8/15/2013| gravel | 18 6/3/2013 | asphalt | 14 thanks if have excel 2007 or later try using sumifs , e.g. in f2 =sumifs(c:c,b:b,"asphalt",a:a,">="&e2,a:a,"<"&eomonth(e2,0)+1) where column contains dates, b items , c tonnages....and e2 should contain 1st of month want sum. can add more more dates in e3 down , copy formula down

opengl - GLSL Partially Overlapping Textures -

i'm trying blend 2 partially overlapping textures in glsl , wondering if i'm misunderstanding concept of multi-texturing. required textures overlap or can have 2 offset textures blend overlap? i have 2 images similar following (minus grid lines , text): example image ideally, overlapping sections of image blend nicely final result 1 smooth image combines 2 together. overlapping orange pixels, example, blend or take higher intensity. i'm new glsl , have been using article glsl shader article uses fragment shader blend textures (fairly standard). following article, i@m setting each texture so: gluseprogramobjectarb( m_hprogramobject ); glint nparamobj = glgetuniformlocationarb( m_hprogramobject, pparamname_i ); ... glactivetexture(gl_texture0 + ntextureid_i ); glbindtexture(gl_texture_2d, ntextureid_i); gluniform1iarb( nparamobj, ntextureid_i ); i bind each texture , draw triangle strips. textures created as: glbindtexture( gl_texture_2d, m_ntextureid ); gl

cordova - Phonegap 3.3.0 + jquery onclick not working -

i using phonegap 3.3.0.0.19.6 on windows 8 platform. have nexus 7 connected via usb test app. i have issue invoking javascript code using onclick. have tried display simple alert box, doesn't work. have followed phonegap tutorial: http://docs.phonegap.com/en/3.0.0/cordova_notification_notification.md.html i have found similar questions within following links. solutions within these posts, not answer current issue phonegap. how fix onclick in phonegap/android in lower versions of android? android/ phonegap - onclick() not working everything worked ok when tried triggering standard alert box in chrome. however, when deploy nexus, no dialog box displayed. <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, height=device-height, initial- scale=1, minimum-scale=1, maximum-scale=1.5, user-scalable=1"> <title>example page</title> <link rel=&quo