Posts

Showing posts from July, 2012

c# - The name 'InitializeComponent' does not exist in the current context. Cannot get any help on net searches -

hi getting error of initializecomponent in app.xaml.cs page have checked net , no solution works. please help. initializecomponent not exist c# file: using system; using system.collections.generic; using system.linq; using system.net; using system.windows; using system.windows.controls; using system.windows.documents; using system.windows.input; using system.windows.media; using system.windows.media.animation; using system.windows.navigation; using system.windows.shapes; using microsoft.phone.controls; using microsoft.phone.shell; using newtonsoft.json; namespace miser_sapp { public partial class app : application { /// <summary> /// provides easy access root frame of phone application. /// </summary> /// <returns>the root frame of phone application.</returns> public phoneapplicationframe rootframe { get; private set; } /// <summary> /// constructor application object

php - How to know if any row of a table satisfies a condition -

i executing codeigniter statement select row table following query: $result = $this->db->query('select * table_name cond1 , cond2); but how know row selected or not. have used count($result) determine number of rows selected. returning 1 in both cases i.e. when row satisfies conditions , when no row not satisfy condition. asking whether there way check that. thank you. here assume there can 1 row present satisfying cond1 , cond2. if($result->num_rows()>0){ //one or more rows satisfies condition }else { //zero rows satisfies condition }

python 2.7 - Django 1.5 class Meta has no attribute 'verbose_name_plural' -

i have upgraded project django1.3 django1.5 getting error "attributeerror: class meta has no attribute 'verbose_name_plural'" base class class portalmodelbase(models.base.modelbase): def __new__(cls, name, bases, attrs): attr_meta = attrs.pop('meta', none) try: is_global = attr_meta.is_global del attr_meta.is_global except attributeerror: is_global = false attrs['meta'] = attr_meta model = super(portalmodelbase, cls).__new__(cls, name, bases, attrs) model._meta.is_global = is_global return model class meta: abstract = true model class having meta class portalmodelbase class portalmodel(models.model): __metaclass__ = portalmodelbase name = models.charfield(max_length=255, verbose_name='name*', help_text='enter name', blank=false) description = models.charfield(max_length=1024, verbose_name='description',

ubuntu - bash: etc/postgresql/8.4/main/pg_hba.conf: No such file or directory -

i159@i159-desktop:~$ psql -u geouser -w -d deodb password user geouser: psql: fatal: password authentication failed user "geouser" fatal: password authentication failed user "geouser" after checked in /etc/postgresql/8.4/main/pg_hba.conf . when executing above command getting error: bash: etc/postgresql/8.4/main/pg_hba.conf: no such file or directory how can fix this? postgresql doesn't start without file - pg_hba.conf should exist on server. this file in data directory - can try sudo su postgres psql postgres -c "show hba_file"

How to display array elements with jquery jsform -

i trying use jsform display edit json data! in samples see how display array "nested objects" like [ {href:'http://www.gargan.org',description:'gargan.org'}, {href:'http://www.github.com',description:'github'} ] and can fetch with <ul class="collection" data-field="data.links"> <li><span class="field">links.description</span> link: <input name="links.href"/></li> </ul> but got "pure" array like [2500,5000,9000,12500,25000,50000] how values of array? update developer updated code! in hour... have latest commit! i updated control include feature. the correct syntax array like: { "quips":["some", "array"] } the html should like: <ul class="collection" data-field="data.quips"> <li><input name="quips."/></li>

amazon web services - Stuck in WAITING_FOR_RUNNER while using an AMI for EC2 Resource -

i able run data pipeline predefined templates. wanted use customized ami ec2 resource require libraries , packages installed. i have run python script part of process. so, have created base image of ec2 resource packages required , code has run. as part of activity, trigger shell command activity, execute python script command has run. the ec2 resource comes based on customized ami have specified. able login machine using key pair specified activity gets stuck in "waiting runner" state. i not sure how solve problem. please let me know if there better ways fix same. missing basic step while trying use ec2 resource ami. use amazon linux when creating custom ami , resolve issue. os comes preinstalled tools used data pipelines communicate instance.

android - Running new Bluetooth Low Energy sample causes RuntimeException -

i've implemented code in android 4.3 bluetooth low energy samples find devices. final bluetoothmanager bluetoothmanager = (bluetoothmanager) getsystemservice(bluetooth_service); bluetoothadapter mbluetoothadapter = bluetoothmanager.getadapter(); mbluetoothadapter.startlescan(mlescancallback); my manifest includes <uses-permission android:name="android.permission.bluetooth"/> <uses-permission android:name="android.permission.bluetooth_admin"/> and device nexus 4 has been flashed factory 4.3 image. i had thing working once, on subsequent runs following errors: 07-25 19:35:09.216 3308-3308/? e/androidruntime: fatal exception: main java.lang.runtimeexception: unable start activity componentinfo{org.voltagex.adamtestapp/org.voltagex.adamtestapp.bluetoothtestactivity}: java.lang.securityexception: need bluetooth permission: neither user 10148 nor current process has android.permission.bluetooth. @

java - password Regexp doesn't work when split up -

i cannot regexp checks if password has @ least 1 digit work. has been answered everywhere answers stop working if split up. example in working password validation if remove: (?=.*[a-z])(?=.*[a-z])(?=.*[@#$%^&+=]) from ^(?=.*[0-9])(?=.*[a-z])(?=.*[a-z])(?=.*[@#$%^&+=])(?=\s+$).{8,}$ in order check presence of single digit, whole thing stops working i'm new regular expressions, seems make sense doesn't, show me light if can. i'm not sure mean the whole things stops working . (?=.*[a-z])(?=.*[a-z])(?=.*[@#$%^&+=]) all above mandate that: a lower case letter must appear @ least once an upper-case letter must appear @ least once any of @#$%^&+= must appear @ least once so, there no reason taking them out should break anything--they independent components. there myriad ways check if string contains number. how want check depends on specific requirements. method used in presented regex through positive-look ahead: ^(?=.*[0

android - Select Text and show meaning as pop up in MUPDF -

Image
i using mupdf library , added features manual zoom in, zoom out , rating, setting brightness. doing long press highlighted text , have show meaning database. trying 2 things 1 clipboard or emulateshiftheld below feature android ics , jellybean. can body suggest on whether 1 thing work feature trying. because on long press can't able capture text. suggestions helpful. this id mupdf activity: public void createui(bundle savedinstancestate) { if (core == null) return; // create ui. // first create document view making use of readerview's internal // gesture recognition mdocview = new readerview(this) { private boolean showbuttonsdisabled; public void onlongpress(motionevent e) { selectandcopytext(); //mdocview.getselecteditem(); //selecttext(mdocview); /*emulateshiftheld(layout); clipboard = (clipboardmanager) getsystemservice(clipboard_servi

ios - How to use one array in different classes? -

i have array. filled in 1 class named "sampledatadao". what need: in 2nd class named "mainmenu" need keep code: - (void)viewdidload { [super viewdidload]; daods = [[sampledatadao alloc] init]; self.ds = daods.populatedatasource; } and in third class named "hview" need use array "ds" (nsmutablearray). need use filled 2nd class, return count of elements: - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { // return number of rows in section. return ds.count; } thanks helping! why should not have singleton class, , have array member of singleton class. more info on singleton found here

ruby sqlite error 'ensure in insert_row': undefined local variable or method 'stmt' -

i have following method in dbmgr ruby class, im using within loop insert data csv sqlite3 db: def insert_row(arow) begin @db = sqlite3::database.open("#{@dbn}") rhash = arow.row_hash stm = @db.prepare("insert programs (programname, episodename) values (? , ? )") stm.bind_param(1, '#{rhash["program"]}' ) stm.bind_param(2, '#{rhash["episode name"]}' ) stmt.execute() programid = @db.last_insert_row_id rescue sqlite3::exception => e puts "exception occured" puts e.message puts e.backtrace ensure stmt.close if stmt @db.close if @db end #db when on console after 1st insertion following error: `ensure in insert_row': undefined local variable or method `stmt' #<dbmgr:0x007f9511050188> (nameerror) initially did not use prepare , bind_params features of ruby sqlite. however, after characters &q

lucene - Using wildcard and required operator in an Elasticsearch search -

we have various rows inside our elasticsearch index contain text "... 2% milk ...". user enters query "2% milk" search field , transform internally query title:(+milk* +2%*) because terms should required , possibly interested rows contain "2% milkfat". this query above return 0 hits. changing query title:(+milk* +2%) returns reasonable results. why '*' operator in first query not work? unless set mapping, "%" sign removed in tokenization process. "2% milk" turned tokens 2 , milk . when search "2%*" looks tokens like: 2% , 2%a , 2%b , etc... , not match indexed tokens, giving no hits. when search "2%", go through same tokenization process @ index-time (you can specify this, default tokenization same) , looking documents matching token 2 , give hit. you can read more analysis/tokenization process here , can set analysis want defining custom mapping good luck!

javascript - d3.js adding a triangles on lines in force-directed graph -

i have force directed graph id d3.js i'm using fun. looks this: http://jsfiddle.net/dzorz/wnstf/ i wanna add little triangles on 2 black lines, arrows. i've tried add triangle path, don't know how append lines.. script: var data = {"nodes":[ {"name":"action 4", "type":5, "slug": "", "value":265000}, {"name":"action 5", "type":6, "slug": "", "value":23000}, {"name":"action 3", "type":4, "slug": "", "value":115000}, {"name":"iron man", "type":1, "slug": "iron_man", "img_href": "http://www.1sticondesign.com/core/free/ironman-128.png"}, {"name":"superman", "type":1, "slug": "superman", "img_href&

php - Appstore Customer Review Download -

i need customer reviews apps .txt, .xml, .csv work them. so far used following .php script: http://tellini.info/2011/07/scraping-app-store-reviews-page-after-page/ unfortunately not working anymore, guess apple changed something i guess apple changed link reviews, because: not working: https://itunes.apple.com/customer-reviews/id458034879?displayable-kind=30&page=0 working: /rss/customerreviews/id=458034879/xml since im not capable of writing php: able repair(/help repair) script or provide me free use solution? problem apple servers. working again.

javascript - Why does Alt Gr have the same keyCode as Ctrl? -

i having play script . and noticed alt gr 's keycode 17 in ie10 , 17 , 18 in chrome? can explain why not 18 (or new number) , why 2 popups in chrome? heres code: document.onkeyup = keycheck; function keycheck(e) { var keyid = (window.event) ? event.keycode : e.keycode; alert(keyid); switch (keyid) { case 18: document.form1.keyname.value = "alt"; break; case 17: document.form1.keyname.value = "ctrl"; break; } } this not code, stumbled upon it. edit : having more of play around believe alt gr means ctrl + alt @ same time, things require alt gr é work ctrl + alt . the problem alert halts execution of code, second onkeyup not called. changing function to function keycheck(e) { var keyid = (window.event) ? event.keycode : e.keycode; switch(keyid) { case 18: document.form1.keyname.value = document.form1.keyname.value+"a

wordpress - Rewrite file url to different file using htaccess? -

i trying hide stylesheet when user visits directly browser, show 404, show correctly on site. possible? trying with: rewriteengine on options +followsymlinks rewriterule ^/?wp-content/themes/mysteam/style.css$ /wp-content/themes/steam/stylesheet.css [l,nc] is there way can achieve this? thanks. you cannot securely hide css file client if want use on @ least 1 page. you can use referer header redirect 404-page if not set, but: this header can spoofed in cases set anyways using developer tools, still visible when viewing request there you set smart system generate unique id every request, , show css file if id matches id authorized see page, but: using developer tools, still visible when viewing request there your stylesheet requested browser apply style text, , therefore possible forge request browser see contents of file (or output file generates) or, more simple, viewing output when browser needs it. the syntax using invalid. see the documentatio

c# - How do I Force suspension of Metro app -

how force app suspend (not shutdown, suspend) , force-resume ourselves when not using visual studio/debugging? when running under visual studio 2012, can enable debug location on debugger toolbar. allow select 1 of 3 operations, "suspend", "resume", , "suspend , shutdown". [edited] sorry, noticed asking non vs solution. can suspend app dragging app down. move cursor top of page until see hand. click , hold , pull down suspend app. takes few seconds before app enter suspend mode. if want things sooner, can use visibility change toggle action first, saving critical stuff.

c++ - Any ip and local ip binding? -

i'm working on network platform creates basic i/o interface make fast/easy. need understand this, main differences between binding ip or local ip socket? why need bind local ip, why need bind ip? simple important question :) binding server socket local ip instead of 0.0.0.0 can act poor man's firewall if want have server not open entire world, specific group. for example: - can bind socket local ip if want used way different processes in same machine communicate. - can bind socket ip if want access occur through external load balancer.

ajax - Update just on Tab of acordion Primefaces -

i have accordion dynamic number of tabs. tab title set css class. makes background ether green or red, depends on if articles in order delivered. for every article there selectbooleanbutton , on every change of these buttons actual tab should updated. the problem is: how can update 1 tab? when update whole accordion first tab opens , other closed. <p:accordionpanel id="ordersaccordion" cache="true" value="#{ordersbean.orders}" var="order"> <p:tab titlestyleclass="#{ordersbean.isorderdelivered(order) ? 'ui-accordion-tab-delivered' : 'ui-accordion-tab-undelivered'}" title="##{order.order_id} | #{order.printableorderdate} | #{order.printableordertime} | #{order.user} | #{order.getdestination().tostring()}"> <p:datatable value="#{order.demands}" var="demand"> <p:column headertext="artikel nr."&g

java bitwise operators and the equal character; compound operators -

i'm bit confused: long v = 0; v <<= 8; v |= 230; i know << signed left shift operator , | bitwise inclusive or i'm confused equals does? so fist v 0. << doesn't have effect? equals 1000 happens then? edit: i've edited title others might better find question: added "compound operators" there += . for example x+=3 means add 3 x; store x. v <<= 8; left-shifts v 8 bits, , stores v, functionally equivalent v=v << 8 . v |= 230; does bitwise or 230 , stores v, equivalent v=v | 230 . now, due performance constraints , optimizations operation may done in place @ low level.

javascript - How to refresh the tableview after deleted -

i able delete tableviewrow when click on button,bt 1 problem delete row database not reflected in view.js file.to see effect of query need start application again.i want display row when click on button instead if start application again.could u suggest me how achieve that. here code if (e.index === e.source.del) { var db=titanium.database.install('/mydata/tododb', 'tododb'); var d=db.execute("delete task content =?",delrow); yourtable.deleterow(e.source.i); // rowview.setdata(yourtable.data); ti.api.info('the delete button clicked'+e.index); } it shows deleted rows after running applicaton.

coldfusion - cfgrid format=flash is not displaying the result -

i trying cfgrid tag format=flash displaying query result.its not displaying output generating grid. sample code tried is: <cfquery name = "getcourses" datasource = "cfdocexamples"> select course_id, dept_id, cornumber, corname, corlevel courselist order dept_id asc, cornumber asc </cfquery> <h3>cfgrid example</h3> <i>currently available courses</i> <!--- cfgrid must inside cfform tag. ---> <cfform> <cfgrid name = "firstgrid" format="flash" height="320" width="580" font="tahoma" fontsize="12" query = "getcourses"> </cfgrid> </cfform>

sql - How to get values grouped by name? -

i have table id name no 1 alex 12 2 alex 13 3 kale 14 4 kale 15 how 'no' values grouped 'name', should return following alex - 12,13 kale - 14,15 if want avoid writing sql, can in django: in [1]: my_app.models import mymodel in [2]: result = {} in [3]: o in mymodel.objects.only('name', 'no'): ...: result[o.name] = result.get(o.name, []) + [o.no] ...: in [4]: result out[4]: {u'alex': [12, 13], u'kale': [14, 15]}

tsql - Alternatives to Importing or Reading Text file with OpenRowSet on Windows 32 in SQL Server 2012 -

good morning friends: i used piece of code in sql server import or read text file. running 64bit machine office 2013 professional (64bit). works well, that's because have microsoft access database engine 2010 64. select * openrowset('msdasql' ,'driver={microsoft access text driver (*.txt, *.csv)}' ,'select * c:\my_folder\databases\my_files\mytext_file.txt') the problem is, started working on computer has office 32, computer 64bit machine as-well. code wont work because cannot install microsoft access database engine 2010 64 32 bit office software installed. need first uninstall 32 bit , re-install 64bit. i not have office software remove/install 32 office. are there other options? i tried creating format file text file unpredictable third party , format breaks, can't seem find error is. not control quality of file. i have tried of on page no luck: http://bradsruminations.blogspot.in/2011/01/so-you-want-to

oop - Javascript prototype constant declaration -

i working restful api, , javascript code making rest queries via jquery's $.ajax() call. i have implemented javascript rest class, show below (greatly simplified): var rest = function (baseurlpath, errormessagehandler) { ... }; // declare http response codes constants rest.prototype.status_ok = 200; rest.prototype.status_bad_request = 400; ... // other rest methods rest.prototype.post = function (params) { $.ajax({ type: 'post', url: params.url, data: params.data, datatype: 'json', contenttype: 'application/json; charset=utf-8', beforesend: this._authorize, success: params.success, error: params.error || this._getajaxerrorhandler(params.errormessage) }); }; ... // more rest methods rest.prototype.executescenario = function (scenarioref) { var self = this; this.post({ url: 'myurlgoes

c# - How to parse the values to string in Windows Phone? -

how parse double format values (distance, calories) string format? taken in textblock. need convert them string in button clickevent. private void positionchanged(object sender, geopositionchangedeventargs<geocoordinate> e) { var coord = new geocoordinate(e.position.location.latitude, e.position.location.longitude); var calories = calorieslabel.text; var previouspoint = _line.path.last(); var distance = coord.getdistanceto(previouspoint); var millisperkilometer = (1000.0 / distance) * (system.environment.tickcount - _previouspositionchangetick); _kilometres += distance / 1000.0; pacelabel.text = timespan.frommilliseconds(millisperkilometer).tostring(@"mm\:ss"); distancelabel.text = string.format("{0:f2} km", _kilometres); calorieslabel.text = string.format("{0:f0}", _kilometres * 65)

database - Mule: Inserting 470.000 records into Salesforce, that only allows 200 records per iteration -

i hava flow in mule gets records db around 470.000 records. these records have put salesforce. salesforce allows me insert 200 records per iteration ! unfortunately have can not these records in 1 db call, overloads machine memory. idea use "foreach" component in mule keep on looping until less 200 records db call. how can these been accomplished ? my config flow here: <foreach batchsize="200" doc:name="for each" countervariablename="foreachcount"> <jdbc-ee:outbound-endpoint exchange-pattern="request-response" querykey="select200records" querytimeout="-1" connector-ref="postgresconnector" doc:name="database"> <jdbc-ee:query key="select200records" value="select * parties limit 200 offset #[variable:offset]"/> </jdbc-ee:outbound-endpoint> <set-variable variablename="dbpayload" value="#[payload

java - LocationClient requestUpdates onLocationChanged never called -

i have code use position map app. tested in galaxy s2 device , works fine, when tested in nexus 4 device onlocationchanged callback never gets called. doing wrong? here activity code: public class basemapactivity extends fragmentactivity implements injectable, googleplayservicesclient.connectioncallbacks, googleplayservicesclient.onconnectionfailedlistener, locationlistener { private final static int connection_failure_resolution_request = 9000; private mapentity component; private boolean yetstarted = false; private locationclient mlocationclient; private locationrequest mlocationrequest; private location location; protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.map_activity); mlocationclient = new locationclient(this, this, this); mlocationrequest = locationrequest.create(); mlocationrequest.setpriority(locationrequest

javascript - Menucool Imageslider showing "Slider purchase reminder" -

i using javascript image slider menucool.com states it's free use. i have implemented effect 9 (one of many effects) on website shows "slider purchase reminder" @ top left of slider area. does have idea why says , how fix it? link site: www.auficecrm.com (the site under construction). refresh 2-3 times , see above text. menucool requests pay of 20$ each domain use there code, can use if free have purchase reminder. can see advertisement of menucool http://www.menucool.com/tooltip-menu license tooltip menu not require menucool menu license. requires menucool javascript tooltip license ($20).

php - jQuery Ajax request only works for single form submission -

i new jquery , ajax, put little system see if produce form various features new me, in hopes can use techniques in future. simple form submitting name, last name, email , phone no. everything works fine when fill out form , submit, , response works fine. however, after response message disappears , form's fields cleared, entering new data , submitting form results in ajax request executing successfully, nothing sent action file, response area (where response message show normally) expanded if there message, nothing displayed. not sure how can better illustrate problem can see code: <div id="wrap"> <div id="response"> <span></span> <div id="ri1"></div> <div id="ri2" class="r_user"></div> </div> <span class="wraptitle">form standard</span> <form method="post" action="process.php" id="mainform" name="

backbone.js - Marionnette layout not showing ItemView -

my layout isn't showing item view. here markup: <div id="wrapper"> <div id="header">header div</div> <div id="main">main div</div> </div> here javascript: var eventview = backbone.marionette.itemview.extend({ template: handlebars.compile("name of event: {{name}}"), model: new backbone.model({ name: "game" }), }); var applayout = backbone.marionette.layout.extend({ template: '#wrapper', regions: { header: '#header', main: '#main' } }); var layout = new applayout(); layout.render(); var event1 = new eventview(); layout.main.show(event1); all want is <div id="main">name of event: game</div> i think first need insert layout inside app region. app = new backbone.marionette.application(); app.addregions({ centerregion: '#center' }); var layout = new applayout();

PHP: how to get variable from function in another function? -

this question has answer here: accessing variable defined in parent function 5 answers example function a(){ $num = 1; function b(){ echo $num; // how $num value? } } in case global not working, because $num isn't global variable. function a() { $num = 1; function b($num) { echo $num; }; b($num); } a();

javascript - find out if I am 20 years before I can sustain myself on the side -

i have sat , work small jquery sciprt specify speed @ age , whether can laws create user. <script type="text/javascript"> $(function() { var today = new date(); var dd = today.getdate(); var mm = today.getmonth(); var yyyy = today.getfullyear(); $.datepicker.setdefaults( $.datepicker.regional[ "da" ] ); $("#datepicker").datepicker({ dateformat: 'yy-mm-dd', changemonth: true, changeyear: true, yearrange: '1950:'+yyyy, maxdate: new date(yyyy, mm, dd), onselect: function(value, ui) { var dob = new date(value); var age = new date(today - dob).getfullyear() - 1970; $('#age').html(age+' år gammel'); // alders kontrol var status = (age<20)? true: false; $('#msg').html( (! status )? '&

xna - Completely reload a gamepage in monogame -

i trying reload gamepage in monogame - touching sprite on page. cannot find solution this. in android, can call finish gameactivity, , recreate new one. how can in monogame? i using wp8.0 sdk, monogame xna 4 framework. i'm not familiar android development, or mean "gamepage", typically type of thing handled "states" in game development. can have playing state, paused state, main menu state, etc, , pass game object each state class , have override update/draw methods own information. so, in case, in playing state of game, , if sprite touched, might want go main title, can pass game object title screen state. title screen can have call loadcontent() reload assets (effectively restarting game completely). not sure if helps. =x

Can screenshot's be disabled in an android app? -

i curious know if screenshots can disabled when running android app if design one. you welcome use flag_secure block screenshots , thumbnails of activities : public class flagsecuretestactivity extends activity { @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); getwindow().setflags(layoutparams.flag_secure, layoutparams.flag_secure); setcontentview(r.layout.main); } }

cordova - Subview not closing causing Memory Leak Phonegap -

i having issues not being able close cdvviewcontroller when calling custom refresh, stays loaded in background , loads new 1 causing memory leaks/high memory usage. have tried use both release , removefromsuperview webview, subview, cdvviewcontroller, childviewcontroller none of them work. running tab bar controller via storyboard, (another reason why have call cdvviewcontroller subview) , when use web inspector via safari can see pages building on tab, , when refresh on tab (not using cdvviewcontroller/phonegap) works fine. appreciated. so here .h #import <uikit/uikit.h> #import <ifaddrs.h> #import <arpa/inet.h> #import <cordova/cdvviewcontroller.h> @interface thirdviewcontroller : cdvviewcontroller <uiwebviewdelegate> { iboutlet cdvviewcontroller *webview; iboutlet uiactivityindicatorview *activityind; } - (ibaction)refresh:(id)sender; @end and .m @interface thirdviewcontroller () @end @implementation thirdviewcontroller - (void)vie

html - error 404 when using absolute url -

i'm creating html email. working fine except link view email in browser. page added couple of weeks after rest of site , on server when click on 404 error, link broken etc. try fix have done following: page stored in folder named 'newsletter'. have since moved file out of folder in root directory , changed url match. have renamed file remove underscores , else other letters , changed url match. have verified file on server using filezilla , through hosting company's site. changed url filename of page in site. when click on link opens page no problem. have emptied cache , history of browsers. have typed url in safari , other browsers still 404 error. there link on page homepage , works fine. appreciated. below html: <td valign="top" width="180"> <div style="font-family:arial; font-size:10px; line-height:100%; text-align:left;"> email not displaying correctly?<br /> <a href="http://www.familymatters.ie/ema

ruby - bundle install FetchError EOFError -

i on windows 2007 box using ruby 2.0 , bundler 1.3.5 i have issuer can install gems fine using gem install bundle install consistently yields following: c:\src\ruby_test>bundle install fetching gem metadata https://rubygems.org/....... fetching gem metadata https://rubygems.org/.. gem::remotefetcher::fetcherror: eoferror: end of file reached (https://rubygems. org/gems/rake-10.1.0.gem) error occurred while installing rake (10.1.0), , bundler cannot continue. make sure `gem install rake -v '10.1.0'` succeeds before bundling. i running behind proxy , using cntlm bypass (using http_proxy variable). @ loss why gem installs work bundler can't. it's possible proxy doesn't support https:// type communication. you might want tweak header of gemfile read: source 'http://rubygems.org/`

ruby on rails - Getting user data from server in angular controller without exposing data -

i've been trying user data rails controller angular controller: in application.html.erb , define user so: angular.element(document).ready(function() { angular.module('mymodule').value('user', <%= @user.to_json.html_safe %>); }); in angular controller: mymodule.controller('mycontroller', ['$scope', 'user', function($scope, user) { $scope.user = user; }]); the problem exposes user data view. there better way this? i've tried approach: in module, created factory $resource object: mymodule.factory('user', function($resource) { return $resource('/users/:action', {}, { 'getuser': { method: 'get', params: { action: 'fetch_user.json' }, isarray:true } }); }); in controller: mymodule.controller('mycontroller', ['$scope', 'user', function($scope, user) { $scope.user = user.getuser(); // tried following. // thro