Posts

Showing posts from September, 2010

Retrieving Facebook's user avatar - how to define dimensions -

i noticed facebook's user avatar has 160x160px default. is there way can have same picture in larger size (180x180 example)? what's best approach if want re-size 90x90? try this (graph api example: 12345/?fields=picture.height(90).width(90)). you can define "type" (small, normal, large, square).

c# - Get Assembly of program from a DLL -

i access function of program attached dll. in dll i've tried: assembly assembly = assembly.getexecutingassembly(); type type = assembly.gettype("uranium"); methodinfo methodinfo = type.getmethod("util"); methodinfo.invoke("sendclient", new object[] { packet.getdata()}); but not works null exception not line. running program called , namespace 'uranium', class 'util' , function 'sendclient'. i have been able solve on own. code: assembly assembly = assembly.loadfrom("uranium.exe"); type type = assembly.gettype("uranium.util"); methodinfo methodinfo = type.getmethod("sendclient"); methodinfo.invoke(null, new object[] { packet.getdata() });

Elasticsearch get position of phrase in document -

i'm working on project need full-text search book. need search in 1 book @ time , need offset of search term beginning of book. need site that's powered django/python think elasticsearch better , faster. so far haven't used elasticsearch directly through abstraction layer django-haystack. edit1: need display users not text searching link them text. should work search box in preview on mac. users see search results surrounding text , if click on redirected js part of book, text located. will simple highlighting suffice? if not, brute-force solution set highlighting pre_tags programmably-identifiable value , calculate offset that. speed setting term_vector with_positions_offsets in mapping use lucene's fast-vector-highlighter: { "type_name" : { "content" : {"term_vector" : "with_positions_offsets"} } } if that's not acceptable, check out this answer information on how offsets stored internal...

linux - Where does the O/P goes when it is redirected to /dev/null -

whenever redirected /dev/null , user$ echo "redirecting output null" > /dev/null where output flushes or if written /dev/null (as man pages says similar writing file), when cleared out? the null device reads written it, , discards it. it's reading file, not storing anywhere, throwing away.

php - Share mysqli connection -

i switched ext/mysql mysqli in php project. in project, extensively used connection reuse feature of mysql_connect setting new_link parameter set false . as far understand, there no such mechanism in mysqli_connect ; return new connection though same host , user used. correct? there other function can mimic reuse-behaviour? nb: see prepending host p: create persistent connection. however, cannot used in case, part of project relies on temporary tables. update: actual mysqli object embedded in db handler class manages access database. handler used interact db. i oversimplified problem because wanted focus on question if mysqli can automatically reuse single connection multiple calls mysqli_connect identical parameters. project extenstion framework , provides multiple entry points , hooks. cannot control order or number of function calles hosting framework extension. each part of extension creates instance of db handler, reuse actual underlying connection. the creation...

javascript - Regex from jQuery source -

i understand of regex not | @ end of each parenthesis. know can used (a(b|c)). match both ab , ac. if in [] match actual symbol "|". me understand this. // used matching numbers core_pnum = /[+-]?(?:\d*\.|)\d+(?:[ee][+-]?\d+|)/.source (?:\d*\.|) means a non-capture group contains 0 or more digits followed dot or nothing @ all. it rewritten like: (?:\d*\.)?

html - Avoid hover effect on specific Child div though hover applied to Parent div -

i have issue hover i have 3 child div's like: <div class="parent"> <div class="child1">a</div> <div class="child2">b</div> <div class="child3">c</div> </div> i had applied hover on parant div change color on child1 , child2 div. yet hover applied on child3 div too.... is there way exclude hover on child3 alone?? any appreciated. in advance. div.parent:hover { color: #909090; } in the above example there has no change of color on font "c" though present inside parant div. you can try adding style .child3 { color : #000; } demo

c# - Completely wiping dotnetnuke cache -

have created module in dotnetnuke 7. have made changes on local test version has created several rows in database. copied these rows live database dont appear in live version of module. have tried clearing cache through host settings , restarting application , still won't show new rows. have tried setting cache settings non-specified , still won't load new rows. there way can reset , find new rows. extremely irritating feature. if you've used "tools, clear cache , reset application" option, running other issue, not caching related. or browser cache issue perhaps. i start confirming data there (always best double check, if think is). make sure module connecting proper table (maybe you're using objectqualifier in development not in production)

c# - INotifyPropertyChanged - Event stays null -

i trying implement following inotifypropertychanged extension: automatically inotifypropertychanged (accepted answer) http://ingebrigtsen.info/2008/12/11/inotifypropertychanged-revisited/ but cant figure out why propertychanged eventhandler stays null. :( i did simple wpf application test out, here xaml code: <stackpanel orientation="vertical"> <textbox text="{binding path=seltabaccount.test, updatesourcetrigger=propertychanged}"></textbox> <textbox text="{binding path=seltabaccount.testrelated, updatesourcetrigger=propertychanged}"></textbox> </stackpanel> and code behind: public partial class mainwindow : window, inotifypropertychanged { public event propertychangedeventhandler propertychanged; private tabaccount _seltabaccount; public tabaccount seltabaccount { { return _seltabaccount; } set { _seltabaccount = value; propertycha...

orchardcms - Simple Image Gallery on Orchard CMS -

i have created new orchard site on azure websites. add image gallery functionality home page. this did: installed nwazet zengallery module created new content type , called 'zen gallery type' added zen gallery part 'zen gallery type' selected widgets orchard admin menu tried add 'zen gallery type' asidesecond zone i presented following error message - can please let me know did wrong? oops. went wrong ... sorry unhandled exception has occurred , request terminated. please refresh page. if error persists, go specified cast not valid. system.invalidcastexception: specified cast not valid. @ orchard.contentmanagement.contentcreateextensions.new[t](icontentmanager manager, string contenttype) in c:\orchard\src\orchard\contentmanagement\contentextensions.cs:line 19 @ orchard.widgets.controllers.admincontroller.addwidget(int32 layerid, string widgettype, string zone, string returnurl) @ lambda_method(closure , controllerbase , object[] ) @ system.web...

jquery - Populating drop down with json object -

i have managed populate drop down menu json object, worked fine. trying display image in hidden div based on option selected drop down. drop down populated json object how retrieve image data. html <form> <fieldset id="autoheight"> <legend>pod</legend> <h2>cars</h2> <select name="drop_down" id="dropdowncars"> <option value="none" selected="selected">select type</option> </select> </fieldset> </form> <div id="showbmw" class="hidden"> <a href="http://cdn.iphoneincanada.ca/wp-content/uploads/2012/08/white-bmw.jpg"></a> </div> json file { cars: [{ "cartype": "bmw", "carid": "bmw123" }, { "cartype": "mercedes", "carid": "merc123" ...

sql - how to join two table in jpa createquery? -

i want join 2 tables have got error . used syntaxe : query qrec2=em.createquery("select o ofplanifie o operateur w o.idope =: w.idope"); but got error : caused by: exception [eclipselink-8025] (eclipse persistence services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.jpqlexception exception description: syntax error parsing query [select o ofplanifie o operateur w o.idope =: w.idope], line 1, column 27: unexpected token [operateur]. internal exception: noviablealtexception(80@[()* loopback of 477:9: (node= join )*]) how can join 2 tables ? you missing comma between 2 tables ofplanifie o, operateur w additionally, if want select columns ofplanifie , have select o.* instead of select o

How to sum data according to page filter in Dynamics NAV 2009 R2? -

i think on every list page has own default data filter. then how know user filter on page if want sum data according filter ? it's not currpage.setselectionfilter right ? :( every page object has implicit record variable called rec. recordset user sees on page comes record variable, respecting filters, sort orders etc. variable may have. because has such immediate effect on screen rendering, think it's best practice leave rec alone as possible, letting added functionality work on record variable. how transfer filters etc. rec new record variable (with same subtype rec)? rec.getfilters may seem candidate, since returns current filters set on rec. however, please bear in mind getfilters respects current filter group: without further actions, return filters set @ filter group level 0. a more efficient approach use copyfilters instead. allows copy filtering (all filter group levels; including records marks, if i'm mistaken) 1 record (i.c. rec) (your custom...

java me - Trouble with Video j2me -

i want play video in j2me,the code using int index = 0; loadvideo(index); string url = "file:///e:/videos/abc.3gp"; try{ player p = manager.createplayer(url); p.realize(); //get video controller videocontrol video = (videocontrol) p.getcontrol("videocontrol"); //get gui display video item videoitem = (item)video.initdisplaymode(videocontrol.use_gui_primitive, null); //videoitem.setpreferredsize(100, 200); //append gui form form.append(videoitem); display.setcurrent(form); //start video p.start(); }catch(ioexception ioe){ } catch(mediaexception me){ } the problem video playing in in small screen mode, how can make fit ...

three.js - executing python scripts in server -

i have developed application, system allows upload 2 different types of files (.obj , .mtl). these files later needed three.js display 3d-model. unfortunately, three.js not take .obj or .mtl directly render model. these files, .obj , .mtl should converted .js (json) in-order acceptable three.js. i have researched on internet , found .obj file can converted .js of converter convert_obj_three.py. i able run above converter in command prompt in desktop convert .obj .js. looking execute python converter in server itself. i have come accross cgi stuff, still can't grasp idea behind it. question is, how execute python scripts in server , store output. (in case output converted file [something.js]).

exception - Android Leaked Window - App adopts an ANR State -

i working android app uses google maps. application works fine often. able see errors in logcat [below]. logcat 08-28 15:37:36.945: e/windowmanager(21969): activity com.kod.example.find_tab_mainactivity has leaked window com.android.internal.policy.impl.phonewindow$decorview@40929cd8 added here 08-28 15:37:36.945: e/windowmanager(21969): android.view.windowleaked: activity com.kod.example.find_tab_mainactivity has leaked window com.android.internal.policy.impl.phonewindow$decorview@40929cd8 added here 08-28 15:37:36.945: e/windowmanager(21969): @ android.view.viewroot.<init>(viewroot.java:263) 08-28 15:37:36.945: e/windowmanager(21969): @ android.view.windowmanagerimpl.addview(windowmanagerimpl.java:171) 08-28 15:37:36.945: e/windowmanager(21969): @ android.view.windowmanagerimpl.addview(windowmanagerimpl.java:114) 08-28 15:37:36.945: e/windowmanager(21969): @ android.view.window$localwindowmanager.addview(window.java:424) 08-28 15:37:36.945: e/windowmanag...

android - How to show json array object in textview -

how add json array in textview? want show json array object "name" in text view. how do it? how getting single element inside array? want print json array obect name in textview jsonobject json2 = new jsonobject(str); status = json2.getstring("status"); if (status.equals("1")) { jsonarray school2 = json2.getjsonarray("data"); txt1.settext(data2.getstring("name")); } "status":1, "data": [ { "dish_id":"37", "name":"dish2", "description":"testing", "allergen": "eggs3,walnuts", "image":"http:\/\/198.57.208.46\/~school\/uploads\/images\/dishes\/egg-biryani.jpg", "ingredient":"weqweqw23,dsfds" } ], "dish_nutrition": {"1": { "name":...

vbscript - Convert Exponential value to Decimal -

any idea how convert exponential value decimal value. have below code returns 1.00000000000051e-02 display 0.01 (100-99.99) dim total dim pct total = 99.99 pct=(100-total) msgbox pct use round function: dim total dim pct total = 99.99 pct = round(100-total, 2) msgbox pct

php - How to create a multidimensional array out of an array and perform a filtering? -

my goal keep array values in array don't know how can that. here's simple array: $grand_total = $total + $cost; $cost_ratio = ($cost/$grand_total) * 100; $paid_ratio = ($total/$grand_total) * 100; $info[] = array( 'id' => $data['id'], 'ratio' => $cost_ratio, 'status' => $status ); here's sample array output array ( [0] => array ( [id] => 53 [ratio] => 100 [status] => c ) [1] => array ( [id] => 57 [ratio] => 100 [status] => ) [2] => array ( [id] => 60 [ratio] => 1.3157894736842 [status] => ) after creating array next thing filter getting ratio. have seen above have variable $cost_ratio , variable 1 filter array. here's continuation of code: //declare variable $var1 = 0; $var2 = 0; $var3 = 0; $var4 = 0; $var5 = 0; $var6 = 0; $...

INSERT INTO Visual Studio 2010 -

i newbie visual studio 2010, there may silly syntax error in code. so, please not downvote question. have database correct , name of table contacts. want insert table (columns - first name , last name) values. now, going wrong in code. error being shown {"syntax error in insert statement."} . please check out code. given below. dim conn new oledb.oledbconnection("provider=microsoft.ace.oledb.12.0;data source=c:\users\rajesh\desktop\documents\visual studio 2010\projects\project \contacts.accdb") conn.open() dim cmd new oledb.oledbcommand() cmd.connection = conn cmd.commandtext = "insert contacts (first name, last name) values('bruce','lee')" cmd.executenonquery() conn.close() any of course appreciated. i think need square brackets around column names because contain spaces: insert contacts ([first name], [last name]) values('bruce','lee')

unlink - PHP: get content from first file in folder and then delete it -

using php, want content first file in folder , when content loaded, delete file. here have: $a = opendir('./'); while (false !== ($entry = readdir($a))) { if($entry != '.' && $entry != '..') { echo $entry = file_get_contents('./'.$entry.'', file_use_include_path); break; // need first file } } the code above loads first file in folder , can delete using like unlink("temp.txt"); so there no permission denied errors. need delete file variable name (because every filename different). surprisingly me, unlink("$entry"); or similar not let me delete it, instead showing warning along first few lines of content of file. if echo $entry shows temp.txt correctly. can enlighten me? missing here? ( optional (un)related question : if have numeric files 1.txt, 2.txt, 3.txt, 10.txt... . there way modify code above in way, not load files 1,10,2,3 ..., instead load 1,2,3,10...?) update: ...

javascript - Place holder is not working -

place holder not working in ie-9,so used below code place holder. jquery(function () { debugger; jquery.support.placeholder = false; test = document.createelement('input'); if ('placeholder' in test) jquery.support.placeholder = true; }); // adds placeholder support browsers wouldn't otherwise support it. $(function () { if (!$.support.placeholder) { var active = document.activeelement; $(':text').focus(function () { if ($(this).attr('placeholder') != '' && $(this).val() == $(this).attr('placeholder')) { $(this).val('').removeclass('hasplaceholder'); } }).blur(function () { if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) { $(this).val($(this).attr('placeholder')).addc...

r - ggplot set scale_color_gradientn manually -

Image
i have data frame this bp r2 log10 96162057 0.2118000 2.66514431 96162096 0.0124700 0.31749391 96162281 0.0008941 0.07012148 96163560 0.5011000 2.48505399 96163638 0.8702000 3.37778598 and want plot bp against log10, , color points r2. r2 continuous values 0-1. myplot <- read.cvs("mytable.csv",head=true) attach(myplot) ggplot(myplot,aes(bp,log10, color=r2)) + geom_point() so far, good. display r2 colors in manually selected intervals , colors, (if had discrete values). ggplot(myplot,aes(bp,log10, color=r2)) + geom_point() + scale_color_manual(breaks= c("1","0.8","0.6","0.4","0.2","0"), values = c("red","yellow","green","lightblue","darkblue")) error: continuous value supplied discrete scale this looks pretty, rather set colors self. ggplot(myplot,aes(bp,log10, color=r2)) + geom_point(shape=1) + ...

angularjs - How do I scroll an ngGrid to show the current selection? -

i'm setting selection of nggrid javascript, calling gridoptions.selectitem() . have multiselect set false, there ever 1 row selected. i'd nggrid automatically scroll show newly selected row, don't know how this: can help, please? on related topic: can disable row selection mouse click? if so, how? edited add i'd disable keyboard navigation of selected row, if possible. what worked: aardvark71's answer worked. discovered nggrid defines property nggrid on gridoptions variable holds reference grid object itself. necessary functions exposed via properties of object: $scope.gridoptions.selectitem(itemnumber, true); $scope.gridoptions.nggrid.$viewport.scrolltop(math.max(0, (itemnumber - 6))*$scope.gridoptions.nggrid.config.rowheight); my grid fixed @ 13 rows high, , logic attempts make selected row appear in middle of grid. i'd still disable mouse & keyboard changes selection, if possible. what worked: this closer 'angular way' , ...

node.js - Express in server to perform a database query -

i want know how expressjs works in server side i need information on server side, main things are,as per knowledge, expressjs can perform functionalists of php - - - true ? my client(android) ready submit post request server if can send 1 single information in form of (key,value) pair , can express accept pair- - identify value based on key and, perform sql query database based on value received android client? if can how it? my express program ( gives response without scenario explained above - how modify program ) var express = require('express') , async = require('async') , http = require('http') , mysql = require('mysql'); var app = express(); var connection = mysql.createconnection({ host: 'localhost', user: '*********', password: "*****", database: 'db' }); connection.connect(); // environments app.set('port', process.env.port || 7002); // //request first re...

python - Django template for loop -

i have template variables back. 1 variable instance.category outputs: "words words words" values split spaced. when use code below letter letter , not words. {% icon in instance.category %} <p>{{ icon }}</p> {% endfor %} output <p>w</p> <p>o</p> <p>r</p> <p>d</p> <p>w</p> .... i need: <p>word</p> <p>word</p> <p>word</p> the django plugin code from cmsplugin_filer_image.cms_plugins import filerimageplugin cms.plugin_pool import plugin_pool django.utils.translation import ugettext_lazy _ models import item class portfolioitemplugin(filerimageplugin): model = item name = "portfolio item" render_template = "portfolio/item.html" fieldsets = ( (none, { 'fields': ('title', 'category',) }), (none, { 'fields': (('image', 'image_u...

sql server - complex sql query to update main table -

i have 3 tables 1)main_table 2)flag_table 3)emp_flagdetails main_table structure emp_no hod_no emp_name flgtype e51397 e44417 asha v e42342 e44417 shaikh faiz ahmed e06636 e44417 balu k u in above table kept flgtype column blank update later have flag_table structure follow flagid flagcategory flagtype 1 bm brml12b 2 bm brmm12b 3 bm brmrmb 4 bm brmcmb 5 bm brmzm 6 vh brml12v 7 vh brmm12v 8 vh brmrmv 9 vh brmcmv emp_flagdetails structure follow ecode flag e44417 brml12b e42342 brmrmb e06636 brmzm e51397 brml12b tables structure,now query want update flgtype coloumn of main_table flagcategory column of flag_table ..in such way if empno main_table present in emp_flagdetails table check flag column of emp_flagdetails matching employee , flag column valu...

c# - Implement interface and use code from existing implementation of the interface -

i'm trying implement itableentity interface can add [datacontract] attribute on it. if implement interface myself, i'll have give readentity , writeentity methods body. but there class implements itableentity interface , gave readentity , writeentity methods body, tableentity.cs . how can make implementation of interface use methods in tableentity class? [edit] [datacontract] public class serializabletableentity : itableentity { private tableentity tableentity; public string etag { get; set; } public string partitionkey { get; set; } public string rowkey { get; set; } public datetimeoffset timestamp { get; set; } public serializabletableentity() { tableentity = new tableentity(); } public void readentity(idictionary<string, entityproperty> properties, microsoft.windowsazure.storage.operationcontext operationcontext) { tableentity.readentity(properties, operationcontext); } public idic...

jquery - Datatables columnFilter plugin: not working with multiple date-ranges -

filtering works fine until add 2 or more date-range filters - e. g. 1 date-range column filter works fine. when add 2 or more date-range column filters, filters cease work (typing of filters shows 0 output). what problem? var otable = $('#sample_editable_1').datatable({ "alengthmenu": [ [5, 15, 20, -1], [5, 15, 20, "all"] // change per page values here ], // set initial value "idisplaylength": 5, "sdom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", "spaginationtype": "bootstrap", "olanguage": { "slengthmenu": "_menu_ records per page", "opaginate": { "sprevious": ...

using getdate() in sql server to get date as "27Aug13"? -

query below output required. how can ouput 27aug13 in sql sever? please suggest the following have spaces: select convert(varchar,getdate(),6) you can replace spaces: select replace(convert(varchar,getdate(),6),' ','')

Rails can't see table edges -

Image
i trying make table model , dont appearance. examples on internet normal, mine have visual problem. index.html.erb <table class="pretty"> <tr> <th><%= sortable "name" %></th> <th><%= sortable "city" %></th> <th><%= sortable "country" %></th> <th><%= sortable "street_address" %></th> <th><%= sortable "sector" %></th> <th><%= sortable "telephone" %></th> <th><%= sortable "fax" %></th> </tr> <% company in @companies %> <tr> <td><%= company.name %></td> <td><%= company.city %></td> <td><%= company.country %></td> <td><%= company.street_address %></td> <td><%= company.sector %></td> <td>...

php - json_decode returning blank -

i working on facebook app . have stored values in database in json format. when fetching value on target page , trying display value follow : $sql = mysql_query("select * `beforepublish` `tabid` = '$page_id'") or die(mysql_error()); $sql = mysql_fetch_assoc($sql); $contest_id = $sql['contestid']; $temp_id = $sql["tempid"]; $value = $sql["values"]; $returnvalue = json_decode($value); echo "<pre>"; print_r($returnvalue); echo "</pre>"; here value of $value = {"image":"upload_1182341221.jpg","conttxt":"get chance win samsung galaxy tab "} and getting $returnvalue blank. but when try : $returnvalue = json_decode('{"image":"upload_1182341221.jpg","conttxt":"get chance win samsung galaxy tab "}'); echo "<pre>"; print_r($returnvalue); echo "</pre>"; then $returnvalue returning...

Facet Name Based on the result in Solr -

i want find name of facets out put based on results mean if have out put as <lst name="facet_fields"> <lst name="state"> <int name="kerala">3312</int> <int name="andaman">10</int> <int name="andhra">0</int> <int name="arunachal">0</int> <int name="assam">0</int> </lst> </lst> i want result of output kerala,andaman both of them having count > 0 there possibility,please me on this i guess want specify minimum count 1 in query. can achieved using facet.mincount

java - Check embedded fonts in pdf using PDFBox -

please, want know fonts extracted pdf embedded or not, how can using pdfbox? may find answere here or to fonts, have iterate through pdf pages , extract font below: pddocument doc = pddocument.load("c:/test.pdf"); list<pdpage> pages = doc.getdocumentcatalog().getallpages(); for(pdpage page:pages){ map<string,pdfont> pagefonts=page.getresources().getfonts(); }

sql server 2008 - tsql - Can i do this in a CASE statement? -

i have 2 results sets shown below: @rounding portfolioid duration aaa -0.1 @finaloutput reportingdate fundcode sector rank duration weight 31/07/2013 aaa sector1 1 0 33.5 31/07/2013 aaa sector2 2 0.9 29.6 31/07/2013 aaa sector3 3 0.6 17.3 31/07/2013 aaa sector4 4 0.8 11.8 31/07/2013 aaa sector5 5 0.1 3.1 31/07/2013 aaa sector6 6 0.1 1.3 31/07/2013 aaa sector7 7 0 0.4 31/07/2013 aaa sector8 8 -0.9 0 31/07/2013 aaa sector9 11 0 -1.3 31/07/2013 aaa sector10 100 0 2.8 31/07/2013 aaa sector11 101 0 1.5 31/07/2013 aaa total 102 1.6 100 what need able subtract duration in @rounding rank 1 , r...

jquery focusout not adding text back in -

i have textarea has text in on page load. when clicks on i'd text go away. when click out of it, if haven't typed i'd text come back, if have nothing happen. text 'type answer here". have works removing text on click not adding in if haven't typed anything. $(".area-3").focusin(function() { $(".area-3").text(" "); }).focusout(function() { if ($(".area-3").val().length == 0) { $(".area-3").text("type answer here."); } }); thanks on this. something : $(".area-3").on({ focus: function() { if (this.value == 'type answer here.') this.value = ''; }, blur: function() { if ( $.trim(this.value) == '') this.value = 'type answer here.'; } }); fiddle

php - Writing for holes in ranges -

i'm trying write program relies on date ranges. trying able alert users when there holes in ranges need reliable way find those, , able handle them effectively. my solution change dates day inserted app rewritten day @ noon. here code that: public function reformdate($date){ return strtotime(date("f j, y", $date)." 12:00pm"); } this allow me deal more regular , consistent dataset. because had see how many days apart, rather seeing how many seconds apart , making decision whether time quantity represented intentional gap or not... i saw, however, when put in today @ noon, if put tomorrow @ noon, since values same, , based on restriction: select * times :date between start , end it triggers response. solution this add 1 start variable, , detract 1 end variable, can check if there overlap asking if difference between start of 1 , end of more 2. anyway, question is: way this? i'm particularly worried number 2 - need worry using...

Where can I add a custom query to Atlassian Crucible when adding files to a code review -

i've seen on couple of sites including atlassian mention of being able add code review via eyeql query; however, nobody ever mentions can input query. admin feature or there way end user can write custom query add files review? found answer. go search , advance search. eyeql query can entered. remarkably helpful when adding entire directory review.

matlab - count equal adjacent element of array -

this question has answer here: run length encoding in matlab 4 answers i've vector a = [0;1;1;1;0;0;1;1;1;2;2;2;2]; and want count number of equal adjacent values in order have matrix this: b=[0 1 1 3 0 2 1 3 2 4]; can me? here short solution: j=find(diff([a(1)-1; a])); b=[a(j), diff([j; numel(a)+1])];

Extracting HTML Link from Javascript Associative Array to apply to D3 Generated Table -

problem: html link i'm extracting associative array not applied link but, rather, string, html link not traversable browser. full visual example , code: located at: http://bl.ocks.org/guerino1/6366020 data: have javascript array of associative arrays. var densityset = [ { name: "<a href=\"http:if4it.com\">if4it</a>", total: 1000 }, { name: "node2", total: 1500 }, . . . { name: "node3", total: 700 }, { name: "node27", total: 1500 } ]; you'll notice first element of first associative array has data element html link. want extract link , apply cell of html table i'm generating using d3. symptom: when table renders, full html path rendered string , not traversable html link. the code extracts link data , applies cell follows... var densitybodydatarecords = d3.selectall("#density_body_record").selectall("tr.td") .data(function(d) { r...

php - Cakephp Not validating data in Form -

i trying validate data form(.ctp file) in cakephp 2.3.8. echo $this->form->create('user').'<br />'. $this->form->input('handle', array( 'rule' => 'notempty', 'alphanumeric' => array( 'rule' => 'alphanumeric', 'required' => true, 'message' => 'username must letters , numbers, no special characters' ), 'between' => array( 'rule' => array('between', 4, 8), ...

asp.net mvc 4 - Web Api hosted on another port on IIS is not accessible -

i have 2 separate projects mvc web app mvc web api have published both on iis 7.5 my web app hosted on 7172 port , web api hosted on 7171 port strangely iam not able call jquery.ajax() web app (7172) web api (7171) port. gives me 405 method not found error code. but if write same jquery.ajax() in web api project (7171) , call web api method work fine , returns data. i want call web api web app. any suggestion appreciated. thanks in advance. this has same origin policy . default, can't execute ajax call domain (both on name, port , protocol). if want enable should use cross-origin resource sharing (cors) . cors can used web api installing (prerelase) nuget package: microsoft asp.net web api cross-origin support this package allows configure domains can call service. can find walk trough here enabling cross-origin requests in asp.net web api . in essence comes down adding attributes controllers this: [enablecors(origins: "http://myclient.az...

Displaying google map in android app with specified options -

i'm new android development , had been trying display map in application time now. managed want display specified options such zoom level, location, etc proving difficult. the following .xml file <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.supportmapfragment"/> and following .java file package com.fourapps.cabkonnect; import android.os.bundle; import android.support.v4.app.fragmentactivity; import android.view.menu; import android.view.menuitem; import android.widget.toast; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.supportmapfragment; import com.google.android.gms.m...