Posts

Showing posts from April, 2013

java - javax.net.ssl.SSLException: Received fatal alert: protocol_version -

has encountered error before? i'm new ssl, there wrong clienthello i'm missing? exception thrown no serverhello response. advice appreciated. *** clienthello, tlsv1 randomcookie: gmt: 1351745496 bytes = { 154, 151, 225, 128, 127, 137, 198, 245, 160, 35, 124, 13, 135, 120, 33, 240, 82, 223, 56, 25, 207, 231, 231, 124, 103, 205, 66, 218 } session id: {} cipher suites: [ssl_rsa_with_rc4_128_md5, ssl_rsa_with_rc4_128_sha, tls_rsa_with_aes_128_cbc_sha, tls_dhe_rsa_with_aes_128_cbc_sha, tls_dhe_dss_with_aes_128_cbc_sha, ssl_rsa_with_3des_ede_cbc_sha, ssl_dhe_rsa_with_3des_ede_cbc_sha, ssl_dhe_dss_with_3des_ede_cbc_sha, ssl_rsa_with_des_cbc_sha, ssl_dhe_rsa_with_des_cbc_sha, ssl_dhe_dss_with_des_cbc_sha, ssl_rsa_export_with_rc4_40_md5, ssl_rsa_export_with_des40_cbc_sha, ssl_dhe_rsa_export_with_des40_cbc_sha, ssl_dhe_dss_export_with_des40_cbc_sha, tls_empty_renegotiation_info_scsv] compression methods: { 0 } *** [write] md5 , sha1 hashes: len = 75 0000: 01 00 00 47 03 01 5

iPad html elements not appearing - until user interaction -

i'm having problem text , images not loading on page when using ipad, 2 , 3. it's quite random, intermittent problem seems effect same sort of items. can't see different or special items. text has error uses embedded font, other text on page render using same font, doesn't appear font embed has failed. images error in carousel, , seem appear once start swipe it. seems show once user has interacted it. person find having similar problem, said them elements weren't on first viewable page before scrolling, whereas me of elements "above fold" too. fix add -webkit-transform: translate3d(0, 0, 0) elements hasn't helped me. know why happening , fix may be? unfortunately cannot reveal site in question. thanks when loading page, loading in viewdidload or viewdidappear? try using viewwillappear instead.

sql server - Any consequences when re-creating a table? -

if want extend column length 30 60 characters varchar column in sql server management studio, have uncheck box prevent saving changes require table re-creation . are there side effects doing table re-creation? reset identity or increment seed, loose indices or find other unwanted effects? i need on live db , don't want find out hard way has changed. this metadata change not require rebuilding table. alter table yourtable alter column yourcolumn varchar(60) [not] null regarding question "are there side effects doing table re-creation" through gui. it unnecessary overhead in case , block concurrent users until table copied , recreated. additionally designer has known bugs when doing (e.g. drops filestream attribute columns)

wordpress - Create a rank column on MySQL query -

i have mysql query want add column rank users, based on balance. query is: select (display_name) 'author', ifnull(round(sum(balance.meta_value),2),2) 'balance', ifnull(round((((sum(balance.meta_value+bet.meta_value)- sum(bet.meta_value))/sum(bet.meta_value))*100),2),2) 'yield %' wp_posts p join wp_users u on p.post_author = u.id left join wp_postmeta bet on p.id = bet.post_id , bet.meta_key = 'bet' left join wp_postmeta balance on p.id = balance.post_id , balance.meta_key = 'balance' p.post_status = 'publish' group u.id order balance desc i tried adding set @rownum := 0; , @rownum := @rownum + 1 rank doesn't work, rank not sorted highest balance. can me. thanks. select *, @rownum := @rownum + 1 ( select (display_name) 'author', ifnull(round(sum(balance.meta_value),2),2) 'balance', ifnull(round((((sum(balance.meta_value+bet.meta_va

scala - AKKA receive reference to message -

in java declaration of onreceive includes reference message object. public void onreceive( object message ) { if( message instanceof myclass ) { in scala no such reference included , cases specific def receive { case "test" => println("ttt") } is there way access received message in scala? like, example, manually forward unknown messages specific actor. like def receive { case "test" => println("ttt") case _ => anotheractor ! themessage } yes, amazingly simple: def receive { case "test" => println("ttt") case themessage => anotheractor ! themessage }

arduino - Bluetooth Chat and Android - Bad data received -

i have problem receiving data arduino using bluetooth sample app. my basic arduino code sends data @ regular intervals. have tried various baud rates. void setup() { serial.begin(57600); } void loop() { serial.print( 1234 ); delay(1000); } the data received in bluetooth chat app gets split 2 parts , first part wrong. data following (my bluetooth device named hc05): hc05: 1 hc05: 234 hc05: 12 hc05: 34 hc05: 1234 hc05: 2 hc05: 234 hc05: 34 hc05: 34 how can fix this? ideas? use println() instead of print() on arduino side. can end of line character on android side make sure whole line. here link similar question example code: error receiving xml strings via bluetooth in android

java - EJB client not displayed on Weblogic -

hi have created ejb 3.0 app , have exposed ejb webservice . have created locale , remote interface same. now port of server 7005 have deployed ejb blocked whereas through ssh proxy 17005 opened . now when go weblogic console , open ejb , go client using port 17005 see wsdl of service not able see ejb client . also when use wsdl through soap ui able run application whereas when create remote client of ejb getting "javax.naming.communicationexception [root exception java.net.connectexception: t3://10.129.196.209:17005" error my ejb remote looks like @remote public interface analyticnotificationwebservice { // public string executeandsave( ) throws exception; /** * method description * * * @param input * * @throws exception * @throws ioexception */ public void sendnotification(analyticsreportsschedulerdto analyticsreportsschedulerdto) throws exception; } whereas bean code like @stateless(name = "analyticsnotificationejbwebservices&qu

asp.net - How to set up shared `system.webServer` settings for all sites on an IIS server -

i'm setting new webserver in our hosting environment. it's new vm ever used us, can want (within reason). it's running iis 7 on windows 2008 r2, asp.net 4.0 installed on system. i'd quite force sites on server use following system.webserver settings, unless explicitly overridden, adding them machine.config or web.config files in framework config folders (both 32-bit , 64-bit versions) doesn't seem have effect. the settings i'm trying force follows. know these settings work fine within individual site's web.config (because i've copy/pasted them production site configured myself) , know iis url rewrite module 2 installed. <system.webserver> <httpprotocol> <customheaders> <remove name="x-powered-by"/> </customheaders> </httpprotocol> <staticcontent> <remove fileextension=".air"/> <remove fileextension=".svg&quo

excel - Multiple SQL query ouput in one Worksheet -

hope 1 me problem facing. issue having difficulties in getting multiple sql queries output in same excel worksheet. through below code able output of one/ single select query output column header. want display more 1 select query output in same worksheet. code --- sub databases() dim rs adodb.recordset dim cn adodb.connection dim ssql1 string ssql1 = "select sum(number_submitted)as number_submitted," & _ "mgr_grp_id,service_ci_id,location_id change_request_enum_f enum_field_cd=11834 , enum_value in (10,11)" & _ "group mgr_grp_id,service_ci_id,location_id" 'ssql2 = "select * change_request_f" set cn = new adodb.connection sheets("sheet4").select selection.clearcontents cn.open "provider=sqloledb.1; uid=userid;pwd=password;initial catalog=bmcdi_dwh;data source=vw-pun-atm-qa26" set rs = new adodb.recordset rs.cursorlocation = aduseclient rs.open ssql1, cn, adopenforwardonly,

PHP (Kirby): redirect gallery to subfolder -

hi i've been working kirby. i'm complete beginner in php managed lot done. need gallery. on homepage single image displayed thumbnail: <?php foreach($articles $article): ?> <li class="<?php foreach(str::split($article->tags()) $tag): ?><?php echo $tag ?> <?php endforeach ?>"> <a href="<?php echo $article->url() ?>" title="<?php echo html($article->title()) ?>"><?php foreach($article->images() $image): ?><?php echo thumb($image, array('width' => 300, 'quality' => 70)) ?><?php endforeach ?><p><?php echo html($article->title()) ?></p></a> </li> <?php endforeach ?> on article page i'd have gallery. gallery snippet: <?php if($page->hasimages()): ?> <ul class="gallery"> <?php foreach($page->images() $image): ?> <li&g

controller - Get list on basis of dropdownlist data in asp.net mvc3 -

i have 2 dropdownlists in module. in 1 dropdownlist, have hardcoded operators <,>,<=,>=,== in second dropdownlist, have hardcoded salary of employees 1000,2000,3000,4000....50000 now if select < 1 list , 2000 second list , click on submit button should list of employees have salary less 2000. i want in asp.net mvc3 how can accomplish task??? do need write stored procedure this? can me?? i have created dropdownlist like: viewmodel.operatorslist = new[] { new selectlistitem { value = "<", text = "<" }, new selectlistitem { value = ">", text = ">" }, new selectlistitem { value = "<=", text = "<=" }, new selectlistitem { value = ">=", text = ">=" }, ne

Is there any opensource javascript library for visualization conversationation? -

i looking 1 opensource library http://visualization.geblogs.com/visualization/cancerconversation/ thanks! you can try out http://d3js.org/ a sample, along others here https://github.com/sanand0/beautiful-visualisations/blob/gh-pages/tweets.html

CMD - Command to change front size -

is there way enter command cmd, , increase front size, not resolution? not clicking on properties, typing command in cmd. you write desired changes registry reg.exe , affect new instances of cmd.exe , not ones running. don't think there builtin command line tool change font size on fly.

python - Replace sequence of same characters -

what fastest way in python replace sequence of 3 , more same characters in utf-8 text?i need replace sequence of 3 , more same characters exact 2 characters. i.e. aaa -> aa bbbb -> bb abbbcd -> abbcd 124xyyyz3 -> 124xyyz3 >>> import re >>> re.sub(r'(\w)\1{2,}', r'\1\1', 'aaa') 'aa' >>> re.sub(r'(\w)\1{2,}', r'\1\1', 'bbbb') 'bb'

android - Ads Don't fill up the entire screen -

here's xml file, <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="match_parent" android:layout_height="462dp" android:background="#ffffff" android:gravity="top" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".quotes" > <imagebutton android:id="@+id/fprev" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="@+id/previous" android:layout_t

c# - Event wiring with mef -

can me problem? i'm working mef framework, communicate via events "the module" plugin. i've created shared interface between 2 parts public class basemodule { public event eventhandler<feedbackarguments> sendfeedback; public event eventhandler<resultarguments> sendresult; public void invokefeedback(string message) { if (sendfeedback != null) sendfeedback(this, new feedbackarguments{feedbackstring = message, feedbackdate = datetime. public void invokeresult(bool passed, string resultmessage, string test) { if (sendresult != null) sendresult(this, new resultarguments { resultstring = resultmessage, passed = passed, passedtime = datetime.now, teststring = test}); } } this module: [export(typeof(imodule))] public class tests : basemodule, imodule { public void rememberdescription() { invokeresult(true, "please remember upload description&qu

asp.net mvc - Excluding shared editor templates from project in Visual Studio doesn't work -

i want run asp.net mvc project without using particular shared editor template has errors eg. ~\views\shared\editortemplates\string.cshtml but when right click , exclude project, used when project run , errors out. should tell visual studio ignore template? i'm using visual studio 2012 professional. if want keep file, not have asp.net mvc use it, rename file. call -string.cshtml . displaytemplates , editortemplates looked in respective directories, matching filenames type used on. when exclude them project physically still present , found, therefore still used.

javascript - Is it safe to pass 'arguments' to 'apply()' -

suppose have following code (completely useless, know) function add( a, b, c, d ) { alert(a+b+c+d); } function proxy() { add.apply(window, arguments); } proxy(1,2,3,4); basically, know apply expects array second parameter, know arguments not proper array. code works expected, safe can pass array-like object second parameter in apply() ? the following work (in chrome @ least): function proxy() { add.apply(window, { 0: arguments[0], 1: arguments[1], 2: arguments[2], 3: arguments[3], length: 4 }); } update: seems second code block fails in ie<9 while first 1 (passing arguments ) works. error array or arguments object expected , shall conclude it's safe pass arguments , while it's not safe pass array-like object in oldie. assuming ecmascript 5.1: yes. per ecma-262, 10.6, arguments object has length , index properties 15.3.4.3 ( function.prototype.apply ) requires.

c# - Check that a given date does not lie between two existing dates inside a datatable -

i have 1 table can store student leave start date , end date so: studentid age startdate enddate 1 14 5/05/2013 7/05/2013 4 17 4/04/2012 8/10/2012 i need check see if new leave applied doesn't fall in range of leave arranged student. example, student id = 1, should not able apply leave starts on 6/05/2013. i'm using c# , looking solution uses sql or linq. normal sql select count(*) table studentid = 'parameterid' , startdate <= 'parameter_startdate' , enddate <='parameter_ensdate';

java - Spring 3 MVC request validation -

i have spring 3.2 application , i've created rest api uses token-based security. every rest json payload contains "token" field used perform security validation. the controller methods this: @requestmapping(value = "/something", method = requestmethod.post) public @responsebody map something(@requestbody somethingparams params) { } where somethingparams has token field, , automatically filled in spring json body of request. is there way automatically have validator invoked on controller methods check parameters such somethingparams have valid token? previously used interceptor, , token included in query string, now, since it's in body of request, have parse json in interceptor in order check it. since spring parses json bind parameters, i'm curious if there's smarter way. ideally global or controller-level settings (not per method). you can use spring validator such cases. @component public class somethingparamsvalidator i

ios - Multiple delegates for one object? (follow-up) -

on question multiple delegates per 1 object? 1 of answers came interesting solution (at least naive eyes) : creating "delegate splitter" allows object (in case uiscrollview) have multiple delegates (in case uiscrollviewdelegate). the code follows: @interface delegatesplitter : nsobject -(void)adddelegate:(id)delegate; -(void)adddelegates:(nsarray*)array; @end @interface delegatesplitter() @property nsmutableset *delegates; @end @implementation delegatesplitter -(id)init { self = [super init]; _delegates = [nsmutableset set]; return self; } -(void)adddelegate:(id)delegate { [_delegates addobject:delegate]; } -(void)adddelegates:(nsarray *)array { [_delegates addobjectsfromarray:array]; } -(void)forwardinvocation:(nsinvocation *)aninvocation { (id delegate in _delegates) { if([delegate respondstoselector:aninvocation.selector]) { [aninvocation invokewithtarget:delegate]; } } } - (nsmethodsignature*) methodsignatur

android - Pressing the menu button on the physical -

i have here example of such code here public class example1activity extends activity { private static final int id_add = 1; private static final int id_accept = 2; private static final int id_upload = 3; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.example1); actionitem additem = new actionitem(id_add, "add", getresources().getdrawable(r.drawable.ic_add)); actionitem acceptitem = new actionitem(id_accept, "accept", getresources().getdrawable(r.drawable.ic_accept)); actionitem uploaditem = new actionitem(id_upload, "upload", getresources().getdrawable(r.drawable.ic_up)); //use setsticky(true) disable quickaction dialog being dismissed after item clicked uploaditem.setsticky(true); final quickaction mquickaction = new quickaction(this); mquickaction.addactionitem(additem); mquickaction.addactionitem(acceptitem); mqu

printing - can I force Outlook 2007 rule to print first page only? -

i have set rule quite print out email when received address (amazon sales) - idea being orders come in, auto printed , waiting packed. however amazon emails require 2 pages. under rules menu in outlook, option "print" no further print preferences available. is there way print first page only? script possibly? no, outlook object model not porvide fine controls on print functionality. workaround, can export message doc file (mailitem.saveas), programmatically load in word , use word obejct model print it.

mysql - Export database results to CSV with PHP -

i've trauled through site , found tonnes of threads same thing none complete novice me dont understand answers properly. i have selected data database , displayed in table on webpage. need link below table export data csv file. one of answers have found on site is: create csv file user in php however answer doesnt make sense me , dont know code. here code answer: header("content-type: text/csv"); header("content-disposition: attachment; filename=file.csv"); header("pragma: no-cache"); header("expires: 0"); $array = array( array("data11", "data12", "data13"), array("data21", "data22", "data23"), array("data31", "data32", "data23")); outputcsv($array); function outputcsv($data) { $outstream = fopen("php://output", "w"); function __outputcsv(&$vals, $key, $filehandler) { fputcsv($filehandle

how backbone.js model fetch method works -

i confuse using backbone.js model fetch method. see following example backbone router: profile: function(id) { var model = new account({id:id}); console.log("<---------profile router-------->"); this.changeview(new profileview({model:model})); model.fetch(); } the first step, model account instantiated, account model looks this. define(['models/statuscollection'], function(statuscollection) { var account = backbone.model.extend({ urlroot: '/accounts', initialize: function() { this.status = new statuscollection(); this.status.url = '/accounts/' + this.id + '/status'; this.activity = new statuscollection(); this.activity.url = '/accounts/' + this.id + '/activity'; } }); return account; }); urlroot property it? after model object created, profileview rendered this.changeview(new profileview({model:model})); , changeview function looks this. cha

Clicking Xtify notification to launch the android app | Appcelerator -

i've managed integrate xtify push notifications titanium app android. receive notifications when click them don't open anything, disappear. this tiapp.xml: <property name="com.activate.gcm.sender_id" type="string">my_sender_id</property> <property name="com.activate.gcm.icon" type="int">2130837504</property> <property name="com.activate.gcm.component" type="string">com.mycompany.myapp/com.mycompany.myapp.myapp</property> <!-- [package name]/[package name].[activity name] --> and xtify code in app.js file: var g = require('xtify_plugin/globals'); var push = require('xtify_plugin/pushnotificationservice'); ti.app.fireevent(g.events.app_opened); my sender id correct , receive notifications already. wanna know if missed code handle notifications. think should @ least open app on own. make sure have same android:name value in androidmanifest.xm

database - codeigniter update table row with new data array where -

i have database record uniqueid/primaryke (ordernumber) i want update record new data same primarykey, ordernumber. my controller is: $data = array( 'customername' => $this->input->post('customer'), 'customeraccountcode' => $this->input->post('accountcode'), 'periodstart' => substr($this->input->post('period'), 0,10), 'orderunitofmeasure' => $this->input->post('buom'), 'creditlimit' => $this->input->post('creditlimit'), 'balancebeforeorder' => $this->input->post('currentbalance'), 'balanceafterorder' => $this->input->post('newbalance'), 'orderlines' => $this->input->post('orderlines'), 'totalcost' => $this->input->post('grandtotal'), 'averagediscount' => $this->input->

ubuntu - Problems installing Oracle Database Express Edition 11g -

i'm trying install oracle database in (x)ubuntu 13.04 64-bit using this guide . goed until following step: $ sudo /etc/init.d/oracle-xe configure oracle database 11g express edition configuration ------------------------------------------------- configure on-boot properties of oracle database 11g express edition. following questions determine whether database should starting upon system boot, ports use, , passwords used database accounts. press <enter> accept defaults. ctrl-c abort. specify http port used oracle application express [8080]: specify port used database listener [1521]: specify password used database accounts. note same password used sys , system. oracle recommends use of different passwords each database account. can done after initial configuration: confirm password: want oracle database 11g express edition started on boot (y/n) [y]: starting oracle net listener...done configuring database... database configuration failed. /u01/app/oracl

java - Exception converting object to XML using jaxb -

i trying build xml object using jaxb. but missing because exception: javax.xml.bind.marshalexception - linked exception: [com.sun.istack.internal.saxexception2: class employee nor of super class known context. javax.xml.bind.jaxbexception: class employee nor of super class known context.] @xmlrootelement(name = "employee") public class employee { private string name; private string employeeid; public string getname() { return name; } public void setname(string name) { this.name = name; } public string getemployeeid() { return employeeid; } public void setemployeeid(string employeeid) { this.employeeid = employeeid; } } @xmlrootelement(name = "data") public class data { public data() { } private list employees; @xmlelementwrapper(name = "employeelist") @xmlelement(name = "employee") public list getemployees() { retu

c++ - Output for simple program using pthread -

void cleanuphandler(void *arg) { printf("in cleanup handler\n"); } void *thread(void *string) { int i; int o_state; int o_type; pthread_cleanup_push(cleanuphandler, null); pthread_setcancelstate(pthread_cancel_disable, &o_state); pthread_setcanceltype(pthread_cancel_asynchronous, &o_type); puts("1 hello world"); pthread_setcancelstate(o_state, &o_state); puts("2 hello world"); pthread_cleanup_pop(0); pthread_exit(null); } int main() { pthread_t th; int rc; rc = pthread_create(&th, null, thread, null); pthread_cancel(th); pthread_exit(null); } i wondering output of code , in order happen. yes, practice test question exam have in 6 hours. appreciated. there no office hours today of ta's college busy own finals. thanks here man pages need understand problem putting on exam (which won't exact problem above.) need understand each of functions doe

drupal 6 - conversion of DateField to TrieDateField in Solr -

i'm using apache solr powering search functionality in drupal site using contributed module drupal named apachesolr search integration . i'm pretty novice solr , have basic understanding of it, hence wish convey apologies in advance if query sounds outrageous. i have date field added through 1 of drupal's hooks named ds_mydate used sorting search results. decided use date boosting , search results displayed based on relevancy , boosted date rather merely being displayed descending order of date. once had updated hook implement same adding boost field recip(ms(now/hour,ds_mydate),3.16e-11,1,1) got http 400 error stating can't use ms() function on non-numeric legacy date field ds_mydate googling same suggested use triedatefield instead of legacy datefield prevent error. adding triedate field named tds_mydate following suggested naming convention , implementing boost recip(ms(now/hour,tds_mydate),3.16e-11,1,1) did achieve boosting. requires me reindex con

jquery ui modal dialog: giving an id to modal buttons -

im using jq ui modal dialog , have included several buttons in dialog. how give individual ids these buttons (in case want target them css updates)?. tia $('#dialog').dialog({ buttons: [{ id:"customid", text: "your button" }] });

sorting - Backbone sort method -

i have following code : campaign.collection = backbone.collection.extend({initialize: function() { }, comparator: function(item) { return item.get('name'); } } i call collection.sort() , seems work , sorts models regarding name field problem gives higher priority uppercase letters example ('some test' < 'more test') there way override behavior ? the easiest fix following: campaign.collection = backbone.collection.extend({ initialize: function() {}, comparator: function(item) { return item.get('name').tolowercase(); } }; this convert lower case before comparing compare in manner ignores case.

c - strange udp socket sendto behaviour -

i'm trying send data using udp socket , capture data using wireshark (under windows7): client_sockd= socket(af_inet,sock_dgram,ipproto_ip); client_address.sin_family = af_inet; client_address.sin_addr.s_addr = inet_addr("192.168.3.100"); client_address.sin_port=htons(8015); client_len=sizeof(client_address); int sended = sendto(client_sockd,buf,11,0,(const struct sockaddr *)&client_address,sizeof(client_address)); it's sending packet correct ip dest port becoming 2698. i'm trying change port in code, doesnot have effect real destination port. it's still 2698. how can fix it? try ipproto_udp instead of ipproto_ip : client_sockd = socket(af_inet, sock_dgram, ipproto_udp);

Coldfusion application in subdirectory REST Mapping Issue -

i have application when in root of site worked fine. put in subdirectory test compatibility , breaks. structure follows: /cfc/ rest/ -- rest endpoints model/ -- orm model mappings util/ -- util classes it's pretty simple crud gets metadata models use in front end. basically, calls rest endpoints or cfc's called rest endpoints encounter error when it's dealing requires pathing. example: getcomponentmetadata("models.table"); errors cannot find componenet models.table. using mapping /cfc/model , if try cfc.model.table , same thing happens, applicationname.cfc.model.table . i have feeling due how cf registering rest endpoints, since works root application, stalls out when it's in subdir. have insight on can done or how cf handles registration there might work around it?

Dynamic Data Model - Asp.Net - Encrypted field - Sorting -

i've built application in dynamic data model asp.net retrieves , saves data underlying data source. 1 of fields encrypted , data cipher text handled in field templates smoothly encrypts/decrypts data seamless user. the issue sort. gridview sorts data data datasource, there workaround can sort data decrypted text? the encryption , decryption handled appropriate methods.

caching - G-WAN: is it possible to turn off microcaching? -

according website g-wan uses microcaching lasts 200ms. way prevent microcaching mentioned on website use changing query parameter. i'd use g-wan. problem home page newsfeed that's personalized each user. though goes same url (mydomain.com) content different each person, facebook or twitter. obviously caching not work in case. there way turn off caching? don't worry microcaching, far got other answers far, applies if used portions of requests stay same, , you'll use cookies identify users, portion change every user, microcaching apply on per user base, e.g. 1 user might same cached version if repeats query in timeframe, user should not same reply user b, not matter how close requests each other.

HTML5 Storage between browsers (on an iphone)? -

is there way have localstorage persist across browsers? have system uses localstorage track iphone accessing system (it's controlled environment), work regardless of browser - if register phone using safari, want know registration key gets stored (currently using localstorage) if use different browser. is possible? there way it? no, localstorage local storage current domain , accessible on particular browser implementation. not , can not ever used across browsers or devices or different domains. you need store key on server somewhere, different browsers can both access it. or perhaps there native feature ios both browsers can access, wouldn't know kind of thing.

javascript - Quick Way to "Un-Angularize" a JS Object -

angular adds expando properties, "hashes," etc., deep object structure when two-way binding in use. that's fine, i'm interested in retrieving json snapshot of object tree things belonged there. angular provide way "vanilla" version of bound object? (i wouldn't want merely store "original value" before binding kicks in, since want reflect changes made via ui.) short answer: there's nice built in function: angular.tojson(yourobj); longer explanation: the difference between angular.tojson , json.stringify runs through filter strips out hashes/ids , turns window, document, , scope strings. if want roll own function this: here relevant snippet angular.js source code: if(/^\$+/.test(key)) { val = undefined; } else if (iswindow(value)) { val = '$window'; } else if (value && document === value) { val = '$document'; } else if (isscope(value)) { val = '$scope'; } note: is

Highcharts: Can I export to the user an Excel or CSV of the raw data driving the chart? -

i have charts generated via highcharts through wp adcenter plugin. want users (admins , subscribers alike) able download raw data driving chart excel or csv, not png, jpg or pdf image of chart. there way without serious modification of code (i'm not php programmer). additional export option feature rolled out in near future? this jsfiddle create excel highchart. download csv option added export menu works fine. go through , own better. here code: /** * small plugin getting csv of categorized chart */ (function (highcharts) { // options var itemdelimiter = ',', // use ';' direct import excel linedelimiter = '\n'; var each = highcharts.each; highcharts.chart.prototype.getcsv = function () { var xaxis = this.xaxis[0], columns = [], line, csv = "", row, col; if (xaxis.categories) { columns.push(xaxis.categories);

Execute php from javascript -

Image
i'm having trouble getting php code working in app. setup rather easy: 1 button, 1 function , 1 php file. script.js $(document).ready(function () { $("#btntestconnectie").click(testconnectie); }); function testconnectie() { $.get("script/sql/testconnection.php"); } testconnection.php <?php echo "it works!"; php?> according post, should work ( how run php code when user clicks on link? ) some sources claim impossible execute php via javascript, don't know believe. if i'm wrong, can point me method work (to connect javascript/jquery script mysql database)? thanks! $.get('script/sql/testconnection.php', function(data) { alert(data) }); you need process ajax result

Error in setting virtual box for android -

i have set virtual machine emulator , has run android iso file , took ip of virtual machine. till point fine when tried to run command "adb connect ip" system giving 'adb' not recognized internal or external command, operable program or batch file. please me resolve this. thanks siva you're using windows. check link . in essence, right-click computer, click "advanced system settings", click "environment variables" , include path adb executable.

iphone - UIButton - Frame and Bounds Zero - Page Based Application -

there similar unresolved question bound , frame uibutton i using storyboards autolayout , " page based application template " i able reproduce problem making standard page based application adding button storyboard , referencing in viewdidappear of dataviewcontroller.m - (void)viewdidappear:(bool)animated { nslog(@"view did appear"); nslog(@"self.mybutton.bounds = %@",nsstringfromcgrect(self.mybutton.bounds)); nslog(@"self.mybutton.frame = %@",nsstringfromcgrect(self.mybutton.frame)); nslog(@"self.mybutton = %@",self.mybutton); } output 2013-05-14 19:37:45.954 frametest4[10777:c07] view did appear 2013-05-14 19:37:45.966 frametest4[10777:c07] self.mybutton.bounds = {{0, 0}, {0, 0}} 2013-05-14 19:37:45.968 frametest4[10777:c07] self.mybutton.frame = {{0, 0}, {0, 0}} 2013-05-14 19:37:45.970 frametest4[10777:c07] self.mybutton = > the header file #import <uikit/uikit.h> @interface dataviewco

Paypal REST API Bad Request -

trying test paypal payments via integration test in grails project using paypal sandbox. @ stage, i'm trying create paypal payment using rest api. code snippet: def jsonpaypalpayment =''' { "intent": "sale", "redirect_urls": [{ "return_url": "http://<return url here>", "cancel_url": "http://<cancel url here>" }], "payer": { "payment_method": "paypal" }, "transactions": [{ "amount": { "total": "0.10", "currency": "usd", }, "description": "this payment transaction description." }] } ''' def client = new restclient("https://api.sandbox.paypal.com") client.contenttype = contenttype.json client.headers.'authorization' = "${tokentype} ${accesstoken}" def resp = client.post(path: "/v1

html - How to align English Arabic Text inside div? -

Image
i have text contains english arabic words , trying align them correctly. here original text: and here get: i have used css direction {rtl ltr bidi} with no luck. any suggestion? works fine here when apply direction:rtl right id . fiddle: http://fiddle.jshell.net/fklvy/2/

iPad iOS 6 How prevent top corners UINavigationBar from rounding with background image -

Image
i have found lot of posts on far no luck. targeting ios 6.0 , have custom background image navigation bar. top 2 corners rounding , have not found way prevent this. i've tried setting status bar black translucent (seems can't on ipad) no luck. i'm attaching screenshot (see blue rounded on top edges). appreciated, thanks. first of all, app looks great. second, rounding status bar - see this answer . so, there is way - rid of status bar. however, app doesn't type make sense have status bar go away. if you, leave as-is - looks great how is.

web applications - Java web app serve both secure and insecure resource -

i writing java web app (spring 3.2). basically, have several sites need access web service. these sites mixture of both secured (ssl) , insecured. have endpoint /validate/{id} should respond both secured requests (https://localhost:8443/ws/validate/123 , http://localhost:8080/ws/validate/123) how do this? i've added <security-constraint> <web-resource-collection> <web-resource-name>ws</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>confidential</transport-guarantee> </user-data-constraint> </security-constraint> to web.xml, forces ssl ( calls 8080 302 found response location header pointing 8443. how allow both secured , insecured requests on same endpoint (with different ports)? <transport-guarantee>none</transport-guarantee> seems have done trick...

css3 - css in portrait mode and land mode with @media -

i have css below. want kind of fluid / liquid (for lack of right terminology) css. developing mobile , when change modes portrait view land view, want flow nicely. right image in <div class="parentdivision-separator-middle" style="margin-top: 3px;"><div class="image childdivision7"></div> works great land view in portrait view leaves lot of space after separator image. if take out !important css starts cut off image. had been fooling around since yesterday. appreciated <style> div.parentdivision { margin-top:2px; } div.parentdivision div { height:281px; background-size: 100%; background-repeat: no-repeat; } @media screen , (max-width: 480px) { div.parentdivision div { height:151px; background-size: 100%; background-repeat: no-repeat; } div.parentdivision-separator-middle { height:151px ;