Posts

Showing posts from January, 2013

Ruby REGEX split, any issues with the code -

i rookie in regex ruby. read tutorials , evaluated piece of code. please let me know if can in better way. here text needs split @ {iwsection(*)} , {{usersection}} t='{{iwsection(1)}} has sample text 1 - line 1 has sample text 1 - line 2 {{iwsection(2)}} has sample text 2 {{iwsection(3)}} has sample text 3 {{usersection}} user section. has sample text has sample text' here ruby regex code able manage. t.split(/^({{[i|u][wsection]\w*...}})/) thank you. the desired output : array as, [ '{{iwsection(1)}}', 'this has sample text 1\nthis has sample text 1 - line 2', '{{iwsection(2)}}', 'this has sample text 2', '{{iwsection(3)}}', 'this has sample text 3', '{{usersection}}', 'this user section\nthis has sample text\nthis has sample text.'] with build hash, { '{{iwsection(1)}}' => 'this has sample text 1\nthis ha

android - "Failed to sign in" Google play game services -

i've spent on 8 continuous hours trying figure out wrong , still have'nt found solution. added leaderboards , achievements libgdx android app, , published in alpha. reason, when try sign in in game, following popup: "failed sign in.please check network connection , try again". sha1 key correct(i checked credentials in developer console) , client id. have no idea causing problem. when check logcat, see this: gamehelper: onar: responsecode=sign_in_failed, giving up. i added myself tester. does know how fix this?! ok figured out, turns out if game published alpha, have publish leaderboards them work.(you cannot use them if ready testing)

php - echoing field from database isn't working as expected? -

it's simple thing reason im not seeing cant echo field mysql database field? below code works except need echo out newly updated vote count, appreciated. <?php require 'core/init.php'; $_session['score'] = $_post['score']; $_session['pid'] = $_post['pid']; $score = $_session['score']; $pid = $_session['pid']; $ipaddy = $_server['remote_addr']; $udvote = $db->query("insert ratings (score, pid, ip) values ('{$score}','{$pid}','{$ipaddy}')") && $db->query("update votes set votecount = votecount +1 pid='$pid'"); if ($udvote){ $votec = $db->query("select votecount votes pid='$pid' limit 1"); echo $votec; } else { echo "error updating database"; } ?> in case else has issues , looks on here solution issue i'll post updated , working code below. <?php require 'core/init.

list - toggle through items in a text file using c -

i have list of primes in form p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 .... i want write loop select each of these in succession , them (multiply them 1 of primes). not sure how go this; code far looks this #include<stdio.h> main() { file *fr; fr = fopen ("primes1.txt", "rt"); } so yeah didn't far. did before amount of data in text file small. file using contains 1 million primes. if can me out thankful! you should able read numbers individually so: int n; file *fp; if ( (fp = fopen("foo.txt", "r")) == null ) { // if file's not found return -1; } while ( fscanf(fp, "%d", &n) == 1 ) { // fscanf reads next integer , skip white space, including linefeeds // next value "n" file // can store them in array, manipulate ones read far, etc } fclose( fp );

css - Where to write Bootstrap options for ms viewport? -

Image
i working on web application uses bootstrap ui. other browsers looks fine, in ie version 10, ui looks broken. i found solution on bootstrap official site. suggested below: put on css , js. css: @-ms-viewport { width: device-width; } @-webkit-viewport { width: device-width; } @-moz-viewport { width: device-width; } @-ms-viewport { width: device-width; } @-o-viewport { width: device-width; } @viewport { width: device-width; } js if (navigator.useragent.match(/iemobile\/10\.0/)) { var msviewportstyle = document.createelement('style') msviewportstyle.appendchild( document.createtextnode( '@-ms-viewport{width:auto!important}' ) ) document.queryselector('head').appendchild(msviewportstyle) } so here have done: copied css your_style.css located under css folder => did not work , got no idea insert javascript. here question/answer explicit instructions confu

c++ get array string from text file -

my text file like jason derulo 91 western road,xxxx,xxxx 1000 david beckham 91 western road,xxxx,xxxx 1000 i'm trying data text file , save arrays when want store data text file array loop non-stop. should ? problem exiting in looping or method data text file ? code: #include <iostream> #include <fstream> using namespace std; typedef struct { char name[30]; char address[50]; double balance; } account; //function prototype void menu(); void read_data(account record[]); int main() { account record[31]; //define array 'record' have maximum size of 30 read_data(record); } //-------------------------------------------------------------------- void read_data(account record[]) { ifstream openfile("list.txt"); //open text file if (!openfile) { cout << "error opening input file\n"; return 0; } else { int loop = -1; //size of array

ios - Objective C - After present modal view the root controller is incorrect -

the first view's name intropage . second view's name search . in viewdidappear i'm using code: search *search = [self.storyboard instantiateviewcontrollerwithidentifier:@"searchpage"]; search.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentviewcontroller:search animated:yes completion:nil]; everything ok when want see current view [uiapplication sharedapplication].keywindow.rootviewcontroller; he shows me current view "intro" instead "search" , causes lot of bugs. when i'm changing code this: [self performseguewithidentifier:@"searchpage" sender:self]; the problem solved can't use code because need add more properties transition. by code added, search modalviewcontroller of intro. doesn't mean search rootviewcontroller. if want change rootviewcontroller, have set search rootviewcontroller. [[uiapplication sharedapplication] keywindow] setrootviewcontroller:search];

c++ - Creating QList of multiple object types -

i need make multiple instances of various class types (classa, classb, classc), , store in single list. is possible create these objects dynamically , add them single qlist? like: qlist<qobject> mylist; mylist.append(classa()); mylist.append(classb()); mylist.append(classc()); this won't compile because objects not of type qobject. static_cast them qobject, able typeid.name() determine origical types? (to cast them later)? i found example here of using qlist< qvariant >, compiler complains that: error: no matching function call 'qvariant::qvariant(classa&)' for code: qlist<qvariant> mylist; mylist.append(qvariant(tempobj)); update: i got compiling creating object during append operation, , using ::fromvalue. mylist.append(qvariant::fromvalue(classa(1,2,3))); not sure right. 1 - cause memory leak/problem creating object in append statement? 2 - why need ::fromvalue make work? (does make second copy of object?) i p

How to list all groups that have CUSTOMER type by Google groups API -

i list groups on google domain has specific "type" customer. knows way query fields returned list filtered? { "kind": "admin#directory#members", "etag": "\"t3t4wfazo04vdxaxnqgkk1fzkz4/w4bu1obly0zcifmdix3ozdwgmsi\"", "members": [ { "kind": "admin#directory#member", "etag": "\"t3t4wfazo04vdxaxnqgkk1fzkz4/q8pz1zbbaqxyeab7lqtcqizetbc\"", "id": "c035o7jwg", "role": "member", "type": "customer" } ] } in older api version: feed_url = ' https://apps-apis.google.com/a/feeds/group/2.0/ ' + google_apps_domain + '/?member=*'

HTTP Header response code -

i installed plugin on wordpress website redirect missing pages homepage. plugin seems working ok header response code redirected page 202. shouldn't 301? from the docs : 10.2.3 202 accepted the request has been accepted processing, processing has not been completed. request might or might not acted upon, might disallowed when processing takes place. there no facility re-sending status code asynchronous operation such this. the 202 response intentionally non-committal. purpose allow server accept request other process (perhaps batch-oriented process run once per day) without requiring user agent's connection server persist until process completed. entity returned response should include indication of request's current status , either pointer status monitor or estimate of when user can expect request fulfilled. the core of message in first sentence: the request has been accepted processing, processing has not been comple

go-couchbase client Update function -

i using update function of go-couchbase //defining function first , passing argument myfunc := func(current []byte)(updated []byte, err error) {return updated, err } myb.update("key123", 1, myfunc) however, when run update function of bucket. checked couch database. document key of "key123" disappeared. seems update not update value delete it. happened? doing not correct? func (*bucket) update func (b *bucket) update(k string, exp int, callback updatefunc) error update performs safe update of document, avoiding conflicts using cas. the callback function invoked current raw document contents (or nil if document doesn't exist); should return updated raw contents (or nil delete.) if decides not change can return updatecancel error. if writer modifies document between , set, callback invoked again newer value. your updatefunc : myfunc := func(current []byte)(updated []byte, err error) {return updated, err }

python - liblinear memory cost too much -

i have run liblinear modeling model file. the python code here: y, x = svm_read_problem(vector_file) prob = problem(y, x) param = parameter('-s 2 -c 1') m = train(prob, param) save_model(model_file, m) the problem when vector_file 247mb, total cost of memory when running liblinear 3.08gb. why cost much? and in project, vector_file large 2gb, how can use liblinear train problem, can model file? okey, know why problem is. when read problem, python interface of liblinear use: prob_y = [] prob_x = [] line in open(data_file_name): line = line.split(none, 1) # in case instance 0 features if len(line) == 1: line += [''] label, features = line xi = {} e in features.split(): ind, val = e.split(":") xi[int(ind)] = float(val) prob_y += [float(label)] prob_x += [xi] return (prob_y, prob_x) in python, int costs 28 bytes , float costs 24 bytes, out of imagination. i post such cases author.

How do I make an array of arrays in Java -

this question has answer here: how make array of arrays in java 4 answers i want create program creates deck of cards , have array of cards. each card array holds 2 values, suit , value. so able card[1] = [1,5] 1 rank of suite , 5 value of card. it's been long time since have used java project reteach me how program. thanks in advance help! int[][] cards = new int[52][2]; so cards[0] value of first card, array 2 elements. cards[0][0] suit of first card, example (if suit comes before value). but consider making array of card objects, , have card object have 2 fields. has advantage of being less confusing (will remember comes first), easier read ( cards[0].getsuit() nicer cards[0][0] ), , if want add more accessory data, it'll easier having tack on third element array.

sql - Can a Parameter in a stored procedure handle a set of rows? -

like title says, example, select product_id, price products price > 100 i need pass records of "product_id" stored procedure... is possible? thanks in advance in general, can use comma separated string / xml data type , pass store procedure create table product (productid int,productname varchar(100)) insert product(productid,productname) values(1,'a'),(2,'b'),(3,'c') get list of productid declare @productid varchar(50) select @productid=case when isnull(@productid,'')='' convert(varchar(5),productid) else @productid+','+convert(varchar(5),productid) end dbo.product; then pass @productid store procedure. after that, can parse string , insert values temp/variable table processing. in case, want pass more information (productname, price,...), can use xml data type. if sql server 2008 or higher version, can use table-value parameters http://msdn.microsoft.com/en-us/library/bb510489(v=sql.105).

c# - Construct redirect URL with RegEx -

how use regex redirecting example exemple.com/en/solution/platform-features to exemple.com/en/platform-features if intention remove third element should it var reg = new regex(@"(?<begin>([^/]*/){2})[^/]*/(?<end>.*)"); var match = reg.match(@"exemple.com/en/solution/platform-features"); var result = match.groups["begin"].value + match.groups["end"].value;

qt - QML Listview header from QAbstractListmodel headerData() -

i'm exposing many qabstractlistmodels qml listview (qt4.8.2 qml 1.1). problem now, qml listview ignoring headerdata() function of listmodels. looking solution more 4 hours now. i'm thinking have implement own q_invokable function realize this. please let me know if there way implement headerdata() function! thanks in advance. a qtquick listview doesn't have header item, doesn't need headerdata() in normal operation. if have added item serves header , want model provide string, can either indeed make headerdata() method q_invokable or add q_property value.

javascript - "Cannot read property .. of null" after checking for undefined object -

i have object need check if defined. also, want check if property of object true or false. so want is if ((typeof myvar !== 'undefined') && (myvar.ismale === false)) { // 1 } else{ // 2 } but logic gives me error uncaught typeerror: cannot read property 'ismale' of null what best login handle condition ? thanks ! you need test further, either exclusion: if (typeof myvar != 'undefined' && myvar && myvar.ismale === false) { or inclusion: if (typeof myvar == 'object' && mvar && myvar.ismale === false) { but there objects return values other "object" typeof tests (e.g. host objects may , function objects do). or explicit conversion: if (typeof myvar != 'undefined' && object(myvar).ismale === false) { edit the additional && myvar test catch nan , null pass typeof test.

Spark+cassandra java.lang.ClassNotFoundException: com.datastax.spark.connector.rdd.CassandraRDD -

i trying read data cassandra 2.0.6 using spark. use datastax drivers.while reading got error " loss due java.lang.classnotfoundexception java.lang.classnotfoundexception: com.datastax.spark.connector.rdd.cassandrardd". included spark-cassandra-connector_2.10 in pom.xml has com.datastax.spark.connector.rdd.cassandrardd class.am missing other settings or environment variables. you need make sure connector on class-path executor using -cp option or bundled jar in spark context (using sparkconf.addjars() ). edit modern spark in spark > 1.x it's recommend use spark-submit command place dependencies on executor classpath. see http://spark.apache.org/docs/latest/submitting-applications.html

html5 - Can't get datatables.net working with javascript -

i'm been trying use datatables http://datatables.net/ trying getting work javascript. won't work me. when using example provided side, still work, blank page. know how work? <script type="text/javascript" src="code.jquery.com/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="cdn.datatables.net/1.10.2/js/jquery.datatables.min.js"></script> <script> var dataset = [ ['trident', 'internet explorer 4.0', 'win 95+', '4', 'x'], ['trident', 'internet explorer 5.0', 'win 95+', '5', 'c'], ['trident', 'internet explorer 5.5', 'win 95+', '5.5', 'a'], ['trident', 'internet explorer 6', 'win 98+', '6', 'a'], ['trident', 'internet explorer 7', 'win xp sp2+', '7', 'a

django - PostgreSQL - check for empty list -

i've written application in django , tested using sqlite. in production want use postgresql , there's problem, because calling: empty_list = [] foo.objects.exclude(pk__in=empty_list).delete() raises programmingerror (bad query - postgres doesn't accept in queries empty in () ) i don't want rewrite code , wrap exclude s , filter s in method checks empty list. don't want write thousand of if s or modify django code. there elegant solution solve this? ok, found this: http://www.tryolabs.com/blog/2013/07/05/run-time-method-patching-python/ it's simple, write sth this: from django.db.models import queryset def new_exclude(self, *args, **kwargs): kw = dict() key, value in kwargs.items(): if is_not_empty_list(value) , is_not_empty_queryset(value): #other checks? kw[key] = value if len(kw): return old_exclude(self, *args, **kw) else: return self old_exclude = queryset.exclude queryset.exclud

loops - how to add imageviews to gridpane using a forloop -

here's code.this prompts exception saying "illegalargumentexception: children: duplicate children added: parent = grid hgap=5.0, vgap=5.0, alignment=top_left" file file = new file("d:\server\server content\apps\icons"); file[] filelist1 = file.listfiles(); arraylist<file> filelist2 = new arraylist<>(); hb = new hbox(); (file file1 : filelist1) { filelist2.add(file1); } system.out.println(filelist2.size()); (int = 0; < filelist2.size(); i++) { system.out.println(filelist2.get(i).getname()); image = new image(filelist2.get(i).touri().tostring()); pic = new imageview(); pic.setfitwidth(130); pic.setfitheight(130); gridpane.setpadding(new insets(5)); gridpane.sethgap(5); gridpan

ios - UICollectionView-make a specific cell to be wider? -

using collection view scroll vertically,we have 2 columns , each row has 2 cells. make specific cell take whole row place, row have 1 cell in ,in width of screen . problem is, when that, works, have push other cells next position, cell 4 take full width: 0 1 2 3 4-- 5 6 how can push cells forward/ effect in more convenient way ? -(uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { if(indexpath.item ==4) cell.frame=cgrectmake(cell.frame.origin.x, cell.frame.origin.y, [uiscreen mainscreen].bounds.size.width, cell.frame.size.height); i can change data source,but seems wrong,specially if many times . - (cgsize)collectionview:(uicollectionview *)collectionview layout:(uicollectionviewlayout*)collectionviewlayout sizeforitematindexpath:(nsindexpath *)indexpath { if(indexpath.row==4) return cgsizemake([uiscreen mainscreen].bounds.size.width, 0.36*[uiscreen m

R: How to join multiple plots into one plot? -

Image
this question has answer here: plot 2 graphs in same plot in r 13 answers i have 2 density distribution data , b, want plot 2 density curves 1 plot. used following codes: plot(user.dens.tas, col="red", xlim=c(0,0.003)) plot(item.dens.tas, col="blue", xlim=c(0,0.003)) how can plot 2 curves 1 plot (combine them)? plot(user.dens.tas, col="red", xlim=c(0,0.003)) lines(item.dens.tas, col="blue", xlim=c(0,0.003)) puts 1 line in read, other in blue on same plot. might consider adding title , other presentation niceties.

java - LIBGDX "parsing error emitter" with 2 or more emitters -

i have problem use of particle effect of libgdx 2 or more emitters. after using particleeditor create .p file, use in code but...when use 1 emitter it's fine more 1, not fine ! :( here error code in java console : exception in thread "lwjgl application" java.lang.runtimeexception: error parsing emitter: - delay - @ com.badlogic.gdx.graphics.g2d.particleemitter.load(particleemitter.java:910) @ com.badlogic.gdx.graphics.g2d.particleemitter.<init>(particleemitter.java:95) @ com.badlogic.gdx.graphics.g2d.particleeffect.loademitters(particleeffect.java:154) @ com.badlogic.gdx.graphics.g2d.particleeffect.load(particleeffect.java:138) @ com.fasgame.fishtrip.android.screens.gamescreen.show(gamescreen.java:313) @ com.badlogic.gdx.game.setscreen(game.java:61) @ com.fasgame.fishtrip.android.screens.mainmenuscreen.render(mainmenuscreen.java:71) @ com.badlogic.gdx.game.render(game.java:46) @ com.badlogic.gdx.backends.lwjgl.lwjglappl

android - How to Import Gradle Project into Eclipse -

i finding hard run gradle sample projects in android studio, getting lots of errors, found solutions few errors in stackoverflow killing of time, of new libraries built using gradle, there way can convert gradle can import in eclipse general android-eclipse project? tried tutorial posted here but of time not working, wanna try new material design samples available form github , can me importing them in eclipse try installing gradle integration eclipse here: http://dist.springsource.com/release/tools/gradle can choose gradle during installation. import / gradle project, select root folder , press "build model" getting list of gradle projects. after selecting project generate eclipse project file , import it. can use projects usual (build, run etc).

java - Vaadin Editable ComboBox with default options -

i'm new vaadin developer , i'm having little problem hope can resolve here. actually have 1 combobox data 1 filter find matches so... need enter new values of user needs in combobox. problem can't enter new values, because when filter deleting new proposal. my code... //select select_editable = new select(); combobox cbeducation = new combobox(); cbeducation.settextinputallowed(true); cbeducation.setnewitemsallowed(true); cbeducation.setfilteringmode(abstractselect.filtering.filteringmode_contains); //fill component items. (int = 0; < planets.length; i++) (int j = 0; j < planets.length; j++) { cbeducation.additem(planets[j] + " " + planets[i]); } //select_editable. mainlayout.addcomponent(cbeducation, 1, 0); mainlayout.setcomponentalignment(cbeducation, new alignment(33)); i hope can me... anyways reading thanks in advance! if want see new entered values after entered

How to structure a vb.net program -

i have basic question trying understand correct way structure vb.net solution. so, suppose i'd create database application supermarket. how go seperating different code modules, appropriate classes, modules etc. should create single file clases, single module public shared methods, should create single namespace include or should seperate each class in own physical file (one class per vb file), seperate modules according usage etc. want know how should 1 think when having organize different code units when designing solution in vb.net. br i'm not sure possible answers question suitable scope & focus of stackoverflow. however , think can find several approaches & guidelines structuring vb.net solution in following links: msdn guidelines "structuring solutions , projects" . this helpful article regarding ".net naming conventions , programming standards" . a youtube video called "how structure .net project" addresses of

Is rs.MoveFirst implicit in Access VBA? -

i have code loops through columns of recordset, rs . code seems work identically if include rs.movefirst or not. is .movefirst implicitly included if don't explicitly include it, or there subtle difference i'm missing? from msdn : when open recordset, first record current , bof property false. if recordset contains no records, bof property true, , there no current record. if first or last record current when use movefirst or movelast, current record doesn't change. based on this, can see movefirst redundant in scenario have non-zero number of records in recordset .

ios - How to open Settings programmatically like in Facebook app? -

i need open settings programmatically within app. searched across everywhere people it's impossible. today saw it's implemented in facebook app. there's button on uialertview , when click open settings. indeed possible open settings, have witnessed myself. how that? know how facebook that? you can't, there no api call this. only system dialogs, dialogs apple frameworks, can open settings app. in ios 5 there app url scheme open system dialog apple removed later. with coming of ios 8 can open settings dialog on apps page. if (&uiapplicationopensettingsurlstring != null) { nsurl *url = [nsurl urlwithstring:uiapplicationopensettingsurlstring]; [[uiapplication sharedapplication] openurl:url]; } else { // present dialog telling user open settings app. }

wcf - How to use message queue with Windows phone 8 app? -

i have windows phone 8 application, communicates wcf service using basichttpbinding. service hosted on iis7 (and not using windows azure) as service may go down reason, exploring use of message queues increase reliability of system. i have looked @ netmsmqbinding provided in wcf - looks binding not supported wp8 client. looking @ using rabbitmq, cannot find working example wp8 client using wcf. please can suggest best way forward? sample code (or links) appreciated. thanks first off, netmsmqbinding cannot used across internet. because uses msmq not exposed on http. when you're making calls resource across internet, unreliability need factor application. because of number of possible problems can encounter, it's not case of if, when, there failure , it's how application deals this important. even so, there things can minimize reliability issues experience, 1 of involve queuing. where queuing can useful taking large, complex, , long running proces

Row as column in sql server -

i have table below in sql server 2008 location lob unitname ---------- --------- ------------------- chennai health unitb mumbai health unitb pune health unita,unitb chennai motor unitb mumbai motor unitb pune motor unitb,unitc trivandum motor unitc and expecting result below.. location health motor --------- -------- -------- chennai unitb unitb mumbai unitb unitb pune unita,unitb unitb,unitc trivandum unitc i need query display this. can me achieve this?? try this: select distinct location, isnull((select unitname table_name t1 t1.location=t.location , t1.lob= 'health'),'') health, isnull((select unitname table_name t2 t2.location=t.location , t2.lob= '

sql server - SQL - how to get the top parent of a given value in a self referencing table -

i'm having small issue. the table looks following subject subjectid subjectname parentsubjectid parentsubjectid references subject table itself. , can go down many levels (no specific number of levels) example (using countries sake of example): 1.europe 2.america 1.1 france 1.1 italy 2.1 usa 2.2 canada 1.1.1 paris 1.2.1 rome and on.. subjectid guid parentsubjectid guid too. sample overview: http://i.imgur.com/a2u2cft.png it can keep going down in levels indefinitely (maybe street number level) my question is: given subject (no matter depth). top parent of subject ( europe/america in case) how can ? possible using basic sql query ? please note cannot modify database @ (i'm querying data existing database) write as: declare @subject varchar(max) set @subject = 'rome'; -- set subject name here subjectcte ( select subjectid , subjectname , parentsubjectid subject subjectname = @subject union select c.subjectid

javascript - Tree table with angularJS and adapt-strap. Columns are "squeezed" -

here simple example tree table using adapt-strap. have problem during adding new columns. tried add column uppercase name: jsfiddle: http://jsfiddle.net/t2qafj81/ html: <div ng-app="adaptv.adaptstrapdocs" ng-controller="treebrowserctrl"> <!-- ===== template files ===== --> <script type="text/ng-template" id="src/treebrowser/docs/treeheader.html"> <div> <span class="pull-left">name</span> <span class="pull-left">name uppercase</span> <span class="pull-right margin-right-lg">price range</span> </div> </script> <script type="text/ng-template" id="src/treebrowser/docs/treenode.html"> <div> <span class="pull-left">{{ item.name }}</span> <span class="pull-left">{{ item.name

facebook - is it possible to (Rate /review) FB page from native ios application? -

i want allow user login using facebook id , give rating particular fb page . possible native ios application ? it's not possible create rating via graph api. have @ docs @ https://developers.facebook.com/docs/graph-api/reference/v2.1/page/ratings you can read ratings.

caching - How do I delete a Windows Azure Shared Cache please? -

i have been forwarded couple of emails 1 of clients regarding retirement of windows azure shared caching. the emails ‘shared caches can deleted via azure management portal.’ however, provide no further instructions, , i’ve been able find on msdn.microsoft.com seems out of date tells me go menu items no longer there. could please provide date instructions on how delete shared cache? there cache on production server, there isn't 1 on staging, , difference i've been able find section 'cache' shows on production under configure, 1 listed. have 'x' next appears delete cache, refreshing page causes reappear. the cache added work around try fix problem (which didn't), , isn't used, need delete it, not migrate different cache. thanks. there solution in new portals shortly (after september 01, 2014) should still able delete in old old portal :-). there's 1 config item left , that's one. https://windows.azure.com/ place be. sur

sms - Android, Delivery of bulk message sending -

i'm developing application sends bulk messages different mobile numbers... sending message method works fine sending 1 message , shows delivery report, when send lots of messages simultaneously, application can't recognize message delivered phone number. cant find example.

apache - Error in MySQL Xampp -

Image
i have installed mysql workbench on computer using port 3306. i installed xampp apache server. when start services error appears: problem detected! port 3306 in use ""c:\program files\mysql\mysql server 5.6\bin\mysqld" --defaults- ile="c:\programdata\mysql\mysql server 5.6\my.ini" mysql56"! mysql not start without configured ports free! need uninstall/disable/reconfigure blocking application or reconfigure mysql , control panel listen on different port i changed mysql port xampp in following way: stop xampp server, if running. edit value "port" in xampp/mysql/bin/my.ini code: password = your_password port = 3306 ---> 3307 socket = "/ xampp / mysql / mysql.sock" and here also code: the mysql server [ mysqld ] port = 3306 ---> 3307 socket = "/ xampp / mysql / mysql.sock" and started mysql service error remains. does can me solve please? thank all best regards ------------------

java - Android throwing null pointer exception when accessing a keyboard from another fragment -

so have fragment activity uses fragments keyboard add marker map , kep getting null pointer exception. i'm accessing keyboard in host fragment add data list.to clear keyboard being used 2 fragments @ same time. code(this fragment access keyboard fragment): @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); final edittext textlat = (edittext)findviewbyid(r.id.textlat); final edittext textlong = (edittext)findviewbyid(r.id.textlong); edittext po = (edittext)findviewbyid(r.id.podata); setcontentview(r.layout.activity_maps); setupmapifneeded(); mmap.addmarker(new markeroptions().position(new latlng(0, 0)).title("marker")); mmap.setmylocationenabled(true); /*this line throws error*/po.setonkeylistener(new view.onkeylistener() { @override public boolean onkey(view v, int keycode, keyeve

php - How does multi-level ORM work in cakephp? -

i have following structure: order ---- (hasmany) ----> carton, shoe carton --- (belongsto) --> order carton --- (hasmany) ----> shoe shoe ----- (belongsto) --> order, carton so order --> carton --> shoe when saving data database order fine, carton fine, shoe gets "carton_id" set correctly, "the order_id" null. there way make work? also when want list shoes belonging particular order (without using order_id) how can find shoes belong carton belongs specific order?

Creating SQLite Database in Cordova and accessing it on android emulator shell -

i create database in application via window.sqliteplugin.opendatabase({name: "mydatabase"}); when want access sqlite database via shell of android emulator, call $ sqlite3 $ .database and is: seq name file --- --------------- ---------------------------------------------------------- 0 main means, no database found. do wrong? when sqlite3 mydatabase select * mytable i get error: unable open database "mydatabase": unable open database file when do .open mydatabase i error: unknown command or invalid arguments: "open". enter ".help" $ sqlite sqlite version 3.8.6 2014-08-15 11:46:33 enter ".help" usage hints. connected transient in-memory database. use ".open filename" reopen on persistent database. sqlite> you did not tell sqlite3 tool which database file use.

Android Studio - Cannot compile project with android-maps-utils -

the rest of team using eclipse , maps added our project. error i'm getting there duplicate of android.gms library, i'm guessing because google play services , map-utils-library both feature package. error:execution failed task ':projectname:processdebugresources'. error: more 1 library package name 'com.google.android.gms' can temporarily disable error android.enforceuniquepackagename=false however, temporary , enforced in 1.0 here current build.gradle: apply plugin: 'com.android.application' dependencies { compile filetree(dir: 'libs', include: '*.jar') compile project(':third_party:sdk:extras:google:google_play_services') compile project(':third_party:facebook-android-sdk-3.17.1:facebook') compile project(':third_party:android-maps-utils:map-utils-library') } android { compilesdkversion 19 buildtoolsversion "20.0.0" packagingoptions { exclude &#

javascript - PHP Populate Text Box from DropDown Selection -

i trying populate 2 text fields after user makes choice on drop down. code below works manual effort in function. need values form.accounts , form.client come query select box using. ideas. should jquery - not familiar it. <?php $db = new mysqli("127.0.0.1", "root", "", "centrum"); $sql = "select accounts_client_accounts.accounts_client_account_id, accounts_client_accounts.accounts, accounts_client.client accounts_client_accounts inner join accounts_client on accounts_client_accounts.accounts_client_id = accounts_client.accounts_client_id order accounts_client_account_id "; if(!$result = $db->query($sql)){ die('there error running query [' . $db->error . ']'); }?> <form class="form-ui"> <span class="form-elements reqfield"> <select class="dropdown" onchange="populatedata(this)"> <option value="0"

reporting services - SSRS: Add +1 image based on amount -

i trying create dynamic representation images. based on initial value above display amount of images. example, want display value 52 , underneath want display 5 images. please @ example: http://i.stack.imgur.com/7qsjz.png is possible or need have images "pre-made" work? have no problem showing single image based on value... one of ways might putting images onto ssrs report , set visibility of based on expression. if can one, doing many should easy aswell use , in expression

laravel - Using count in an eloquent query -

$data = user::where(function($q){ $q->where(user::wherein('access', array(1,2,3,4))->count(), 4); })->get(); i want users have access of 1,2,3,4 (used illustrative purposes passed in array). i getting users count of in query equals 4. how can done in eloquent? above code errors, trying select users 4 = 4. where going wrong?

sql - Not a single-group group function while using case when statements -

in query trying use case when keywords. have check 3 conditions there. getting not single-group group function error. syntax error in query? please guide. query select case when dist_type_id in (5033,5034,5035,5036) min (b2b_start_dt +nvl(access_lead_days,0)) else case when max(overridden) = 0 nvl (min (src_start_dt), min (b2b_start_dt)) else max(b2b_start_dt) end end start_date prog_access_movie_v trunc(sysdate) between b2b_start_dt , b2b_end_dt , (user_id not null or group_id not null) , dist_type_id in (5034) , prog_id = (432899) this select : select (case when dist_type_id in (5033, 5034, 5035, 5036) min(b2b_start_dt + nvl(access_lead_days, 0)) else (case when max(overridden) = 0 nvl(min(src_start_dt), min(b2b_start_dt)) else max(b2b_start_dt)

angularjs - Passing JavaScript to Closure in JavaScript -

i'm learning how use javascript. i've run situation i'm getting error. error is: typeerror: 'undefined' not object (evaluating 'this.flagged') . i've narrowed down code happening. code looks this: var flagged = false; var intervals = []; return { flagged: flagged, intervals: intervals, createinterval : function (options) { var defer = $q.defer(); if (this.throwserror) { defer.reject('there error creating interval.'); } else { this.intervals.push( $interval(function() { console.log('here 1'); console.log(this.flagged); }, 1000 )); } } }; the error gets thrown @ the: console.log(this.flagged); i'm guessing has fact " this " isn't visible. yet, if " this " isn't visible, i'm not sure how value flagged . can please explain me need value flagged ? thank you! when using this inside $interval won'

wcf data services - Failed to load resource: the server responded with a status of 500 (Internal Server Error) in ajax call -

here iam using wcf service url bind json data slickgrid , shows error failed load resource: server responded status of 500 (internal server error) when click on link next error message works can 1 me whats exact problem here , code $.ajax({ url: "http://localhost:4789/service1.svc", contenttype: "application/json;charset=utf-8", type: "post", data: "{}", datatype: "json", error: function (jqxhr, textstatus, errorthrown) { console.log(jqxhr); }, success: function (data) { slickdata = data.d; var obj = json.parse(slickdata); grid = new slick.grid("#teamgrid", obj, columns, options);

javascript - Validate function works on ValidationTextBox but not on FilteringSelect. Why? -

i'm having rather strange behaviour , don't know if it's because i'm not doing right. i trying customize dojo filteringselect in application show invalid messages @ will. looking @ api, found way it. way works fine validationtextbox. code switch validation state: var originalvalidator = textbox.validator; textbox.validator = function() {return false;} textbox.validate(); textbox.validator = originalvalidator; here's fiddle can take look: http://jsfiddle.net/phusick/hgbnq/ if change validationtextbox filteringselect, should work same. reason, doesn't! here's fiddle: http://jsfiddle.net/nachoargentina/hgbnq/421/ any suggestions appreciated! dijit/form/filteringselect indeed inherit dijit/form/validationtextbox , overrides isvalid ( source ). isvalid calls validator function in validationtexbox . you compose own filteringselect uses same method validationtextbox uses isvalid , or whatever wanted or needed use.

c# - Redraw issue with NumericUpDown -

Image
hi have weird redraw issue numericupdown control. if have control @ same location , set visible property false , visible property of numericupdown true numericupdown appears without border , parts of other control visible in background (even if visible property false ). call refresh of numericupdown or parent container won't change anything. if control in background textbox numericupdown appears correctly assume case cause border equal , therefore looks it's drawn correctly. is bug of numericupdown control? how can fix it? thanks help. edit: here screenshot. change visible properties of combobox , numericupdown dependent of checked properties of radiobuttons . private void button1_click_1(object sender, eventargs e) { panel p = new panel(); p.location = new point(10, 10); p.height = 200; p.width = 200; p.borderstyle = borderstyle.fixed3d; controls.add(p); numericupdown nud = new numericupdown(); nud.location =

jquery - How to rearrange the buttons in the header in a full calendar -

i have used fullcalendar generate events. want rearrange buttons in header. for example, month, week , day buttons should display in first row. title should placed between prev , next button. how achieve this? thanks in advance. $('#calendar').fullcalendar({ header: { left: 'prev', center: 'title', right : 'next' }, titleformat: { month: 'mmmm yyyy', week: 'mmmm yyyy', day: 'mmmm yyyy' }, contentheight: 300, height: 200 , eventrender: function(event, element) { element.popover({ title: event.title1, placement: 'auto', html: true, trigger: 'click', animation:'true', content: event.msg, container: 'body' }); $('body').on('click', function(e) { if (!element.is(e.ta