Posts

Showing posts from September, 2010

sql - Does the size of the data stored in the record affect the Clustered index performance? -

i have 3 tables. primary fact table (facttable) a table containing int field + other 'n' varchar(50) fields(table001) a table containing int field + other 'n' varchar(max) fields(table002) records in each table: #5 million rows query: select * facttable f (nolock) inner join table001 t001 (nolock) on f.id = t001.id inner join table002 t002 (nolock) on t002.id = f.id f.datefield = '2014-02-01' all tables have clustered index on field 'id'(which used in joining tables i.e., foreign key) the clustered indices not fragmented(fragmentation percentage < 5%) on tables the case when join 3 tables, seeing in execution plan cost of joining table002 higher table001. there reason behavior? link xml execution plan: https://onedrive.live.com/redir?resid=7e436ae9d73999b0%21120 i couldn't paste xml content because of size restriction. another link : http://www.expinos.in/executionplan.sqlplan the size of columns in row, not in

c++ - Static inline method no need static member initialization -

there class: k.h class k { static int ii; static void foo(); }; k.cpp #include "k.h" void k::foo() { ii++; } during compile following error message: error lnk2001: unresolved external symbol "private: static int k::ii" (?ii@k@@0ha) it's ok. when add inline keyword method, error disappeared: class k { static int ii; inline static void foo(); }; this not real-world example, don't know happens in code, may explain me? this code: #include <iostream> using namespace std; struct k { static int ii; static void foo(); }; void k::foo() { ii=0; } int main() { // code goes here return 0; } gives linking error, because function k::foo output compiler, , references k::ii. this code: #include <iostream> using namespace std; struct k { static int ii; inline static void foo(); }; inline void k::foo() { ii=0; } int main() { // code goes here return 0; } do

multithreading - Python threading module error: 'NoneType' object is not callable -

my screen displays <type 'exceptions.typeerror'>: 'nonetype' object not callable when run code below: import threading import urllib2 import queue import time hosts = ["http://baidu.com", "http://yahoo.com"] queue = queue.queue() class threadurl(threading.thread): """ threaded url grab """ def __init__(self, queue): threading.thread.__init__(self) self.queue = queue def run(self): while true: #grabs host queue host = self.queue.get() #grabs urls of hosts , prints first 1024 byte of page url = urllib2.urlopen(host) #signals queue job done self.queue.task_done() start = time.time() def main(): in range(2): t = threadurl(queue) t.setdaemon(true) t.start() host in hosts: queue.put(host) queue.join() main() print "elapsed time: %s" % (t

swing - Get Pixel Color on screen Java? -

hello trying color of particular pixel on jframe. this code. frame red. the problem having when click frame should return me rgb color red (255,0,0) when click @ different points rgb color white (255,255,255) problem in code guys? public class guitest extends jframe { private static shape ellipse; private static robot rb; public guitest() { super("4-connected approach"); setlayout(new flowlayout()); setdefaultcloseoperation(jframe.exit_on_close); setvisible(true); setsize(800,800); this.getcontentpane().setbackground(color.red); setlocationrelativeto(null); addmouselistener(new mouselistener(){ @override public void mouseclicked(mouseevent e) { system.out.println("pixel:"+e.getx()+","+e.gety()); try { system.out.println(getpixel(e.getx(),e.gety())); } catch (awtexception e1) { // todo auto-generat

performance - difference between opened files and open files in mysql -

in below status have opened files count '95349'. value increasing rapidly. mysql> show global status 'open_%'; open_files = 721 open_streams = 0 open_table_definitions = 706 open_tables = 741 opened_files = 95349 opened_table_definitions = 701 opened_tables = 2851 also see this. mysql> show variables '%open%'; have_openssl = disabled innodb_open_files = 300 open_files_limit = 8502 table_open_cache = 4096 and max_connection = 300 is there relation open files , opened files. there performance issues because of increasing opened_files value. server of 8 gd ram , 500 gb hardisk processor: intel(r) xeon(r) cpu e3-1220 v2 @ 3.10ghz. dedicated mysql server. here command ulimit -n; 1024 count the server hanging often. using online tools have optimised parameters already. need know else should optimized ? in case opened files count red

javascript - How to change the displayed text in label (for Internationalization) -

i have html file contains this > <label id="remem" for"remem"><input type"checkbox" > name="remem"/>test</label> now im dealing i18n , working on translating these words. , need translate word test different language. how change label (in example.."test" ) programmatically?? attribute should deal with? thanks! give text inside <span> tag id > <label id="remem" for"remem"><input type"checkbox" > name="remem"/><span id="rememtext">test</span></label> then can use javascript manipulate text. document.getelementbyid("rememtext").innerhtml = "another language";

d3.js - change Axis domain/range doesn't work in nvds -

i'm trying nvd3 example @ http://nvd3.org/livecode/index.html#codemirrornav please click on plot 2 "scatter/bubble chart". original code javascript like: nv.addgraph(function() { var chart = nv.models.scatterchart() .showdistx(true) .showdisty(true) .color(d3.scale.category10().range()); chart.xaxis.tickformat(d3.format('.02f')); chart.yaxis.tickformat(d3.format('.02f')); d3.select('#chart svg') .datum(data(4,40)) .transition().duration(500) .call(chart); nv.utils.windowresize(chart.update); return chart; }); i tried change xaxis range/scale/domain see if has anything. somehow doesn't work. what did add var xscale = d3.scale.linear().domain([0,1]).range([1,4]); chart.xaxis.scale(xscale); chart.xaxis.tickvalues([1,2,3]); below yaxis line in original plot. can see tickvalues work expected. somehow both domain , range doesn't work expected. i see xaxis start differen

php - Laravel and Infinite Scroll not showing -

i'm having trouble implementing infinity scroll laravel site. in google chrome dev log there no errors, but doesn't work when go browse grid. in displays standard laravel grid pagination links @ bottom {{ html::script('assets/js/jquery.infinitescroll.js') }} <script type="text/javascript"> $(function() { $('#boxes').infinitescroll({ navselector : ".paginate", nextselector : ".paginate a:last", itemselector : ".box", debug : false, datatype : 'html', path: function(index) { return "?page=" + index; } }, function(newelements, data, url){ var $newelems = $( newelements ); $('#boxes').masonry( 'appended', $newelems, true); }); }); </script> laravel blade <div id="boxes" class="browse-grid"> @if ( ! $data->isempty()) @foreach($data $k

android - How to display lat-lng points on map when open notification ? -

i developing 1 application in want show map when open notification, received notification when open notification not open map lat long values. gcmintent service class public class gcmintentservice extends intentservice{ context context; public static int notify_no=0; //system.currenttimemillis(); private notificationmanager mnotificationmanager; notificationcompat.builder builder; public static final string tag = "gcm notification"; public gcmintentservice() { super("gcmintentservice"); // todo auto-generated constructor stub } @override protected void onhandleintent(intent intent) { // todo auto-generated method stub bundle extras = intent.getextras(); string msg = intent.getstringextra("message"); googlecloudmessaging gcm = googlecloudmessaging.getinstance(this); string messagetype = gcm.getmessagetype(intent); if (!extras.isempty()) { if (googlecloudmessaging. message_type_se

Eclipse wizard to create new Android Activity doesn't work -

this first question, hope make right. have problem eclipse , android. i'm using last build of android adt bundle, adt-bundle-windows-x86_64-20131030 , , when try use procedure new --> other --> android activity existing project, doesn't nothing , see on error log tab give me 2 errors: first error expression manifestout undefined on line 9, column 39 in recipe.xml.ftl. problematic instruction: ---------- ==> ${escapexmlattribute(manifestout)} [on line 9, column 18 in recipe.xml.ftl] ---------- java backtrace programmers: ---------- freemarker.core.invalidreferenceexception: expression manifestout undefined on line 9, column 39 in recipe.xml.ftl. @ freemarker.core.templateobject.assertnonnull(templateobject.java:125) @ freemarker.core.expression.getstringvalue(expression.java:118) @ freemarker.core.expression.getstringvalue(expression.java:93) @ freemarker.core.listliteral.getvaluelist(listliteral.java:95) @ freemarker.core.

spring batch admin console which pom to generate war file -

i spring batch admin console working on application server. i've gone download https://github.com/spring-projects/spring-batch-admin/releases . there lot of poms in project? pom 1 have run war file admin console. my directory structure looks this... spring-batch-admin-manager spring-batch-admin-parent spring-batch-admin-resources spring-batch-admin-sample spring-batch-admin-integration thanks

javascript - When clicked on a button that handles event more than one time setInterval goes crazy? -

when click in automatic button (auto) more once, handles setinterval method, color divs go crazy fast, reason i'm here know. demo in jsfiddle demo of color divs setinterval method body: <div id="placediv1">ok</div> <button id="b1" onclick="forward()">forward</button> <button id="b2" onclick="backward()">backward</button> <button id="b3" onclick="skip2()">skip2</button> <button id="b4" onclick="automatic()">auto</button> <button id="b5" onclick="stop()">stop</button> <script> var myarray = ["black", "yellow", "green", "red", "blue", "blue", "black", "gray"]; var myarray1 = ["yellow", "blue", "green", "red", "green", "blue", "black", &q

php - Mysql parent record have multiple records in child table show in one column -

i have 2 table user (user_name,user_id) servies (service_id, service_name, user_id) one each user have manay servics e.g user " john " have many record in servies php , html , seo i want show each user services follow user_name ---------------servies john --------------------php, html,seo miky --------------------java, c# , objective c i want select query of results select user_name,group_concat(service_name) user join servies on user.user_id=servies.user_id group user_name

audio - Apple HLS with ffmpeg and mediastreamsegmenter and vlc -

i'm trying stream using ffmpeg stream windows box. here command i'm running on windows box ffmpeg -f dshow -i audio=”wave in 2 32130101 (orban optim” -acodec libmp3lame -ab 64k -f mpegts udp://172.30.16.181:2222?pkt_size=188?buffer_size=128000 this part works , i'm able listen on mac via vlc , i'm streaming out vlc port 20103 but when use mediasegmenter mediastreamsegmenter -s 3 -f /users/vickkrish/ 127.0.0.1:2222 this happens mar 6 2014 04:11:02.926: audio pid set @ 44 mar 6 2014 04:11:03.165: audio pid change 44 mar 6 2014 04:11:03.328: audio pid change 44 mar 6 2014 04:11:03.583: audio pid change 44 mar 6 2014 04:11:03.745: audio pid change 44 mar 6 2014 04:11:03.989: audio pid change 44 mar 6 2014 04:11:04.151: audio pid change 44 mar 6 2014 04:11:04.316: audio pid change 44 mar 6 2014 04:11:04.492: audio pid change 44 mar 6 2014 04:11:04.740: audio pid change 44 mar 6 2014 04:11:04.887: audio pid change 44 mar 6 2014 04:11:05.175: audio p

visual c++ - Is there any benefit to passing all source files at once to a compiler? -

i have read "whole program optimization" (wpo) , "link time code generation" (ltcg). i wonder there more inter-module-analysis going on if pass sources @ once compiler cli (like "g++ a.cpp b.cpp")? or going enable 1 of flags? is there difference between compilers this? instance can intel compiler benefit such practice while other compilers don't? i wonder there more inter-module-analysis going on if pass sources @ once compiler cli (like "g++ a.cpp b.cpp")? for gcc, no, doing not enable wpo, each translation unit processed separately, in isolation. i'm 99% sure same true clang, , 90% sure it's true other compilers. with gcc, enable inter-module optimisation need request explicitly via -flto switch, still processes each translation unit in isolation, additional information written object file , when linked further optimisation passes done produce final output.

mysql - Attaching an android form to asp.net -

i creating android application have form user needs fill up. want send values inserted asp.net page catches data , saves database attached page , after value gets inserted database database sends response android application. 1 or 0 send feedback 1 successful data entry 0 failure. can done if how?? please , thank you. this android code public void postdata() { // create new httpclient , post header httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://www.yoursite.com/myexample.aspx"); try { // add data list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2); namevaluepairs.add(new basicnamevaluepair("empid", "12345")); //keep adding namevaluepairs.add(new basicnamevaluepair("secondvariable", "12345")); httppost.setentity(new urlencodedformentity(namevaluepairs)); // execute http post request httpresponse response = httpclient.execute(httppost); httpentity

Add blank line between two lines of text in webcal event's description -

how add blank line between 2 lines of text in webcal event's description? \n\n doesn't work. it might if provide full icalendar stream but, assuming encoded them correctly, using "\n" way express intentional line break. did try display event using different clients ?

why receiving duplicated frames using sockets in python? -

i make simple client/server code send/receive frames using sockets, @ reception, receive duplicated packets this > num seq= 4751 num seq= 4751 num seq= 4752 num seq= 4752 num seq= 4753 > num seq= 4753 num seq= 4754 num seq= 4754 num seq= 4755 num seq= 4755 > num seq= 4756 num seq= 4756 num seq= 4757 num seq= 4757 num seq= 4758 > num seq= 4758 num seq= 4759 num seq= 4759 num seq= 4760 num seq= 4760 > num seq= 4761 num seq= 4761 num seq= 4762 num seq= 4762 num seq= 4763 > num seq= 4763 num seq= 4764 num seq= 4764 num seq= 4765 num seq= 4765 > num seq= 4766 num seq= 4766 num seq= 4767 num seq= 4767 num seq= 4768 > num seq= 4768 num seq= 4769 num seq= 4769 num seq= 4770 num seq= 4770 > num seq= 4771 num seq= 4771 num seq= 4772 num seq= 4772 num seq= 4773 > num seq= 4773 num seq= 4774 num seq= 4774 num seq= 4775 num seq= 4775 > num seq= 4776 num seq= 4776 num seq= 4777 num seq= 4777 num seq= 4778 i couldn't understand why packets duplicated @ rec

internet explorer - SVG Images not visible when ie9 with ie8 standards is used -

when ie9 ie8 standards used, svg images not visible in website. any suggestion solve problem? thanks you should have image fallback deal browsers don't support svg: <img src="images/yourimage.svg" onerror="this.src='images/yourimage.png'"/> if browser doesn't support svg, fail load image (since not accept svg mime type), , throw error captured onerror , replace using javascript.

php - Change and display element from an array -

i have awstat file of lists country code , how many visits , hits: # domain - pages - hits - bandwidth begin_domain 1 ua 245 245 970690 90 647 10311747 cn 27 27 106974 ru 25 26 99953 gb 12 82 1155179 fr 7 7 41230 kr 4 4 15848 de 4 15 211641 in 3 15 234340 ph 2 2 7924 lv 2 2 0 ro 2 2 13856 il 1 1 3962 dk 1 1 3962 vn 1 1 3962 nl 1 1 3962 lt 1 1 3962 ca 0 1 20264 end_domain i'm trying extract , displays countries nombre of pages per country, tried this: preg_match("/begin_domain(.*)end_domain/is", $awstats, $matches); $country = $matches[0] ; awstats_extract_country($country) ; which calls function awstats_extract_country($country) : function awstats_extract_country($country) { $country = explode("\n", $country) ; unset($country[(count($country)-1)]) ; unset($country[0]) ; foreach ($country $key => $value) $country[$key] = explode(" ", $value) ; //print_array($sider); $fields = array

python - 'str' object not callable -

i have problem in django: 'str' object not callable code: urls.py app usuarios: from django.conf.urls import patterns, include, url django.contrib.auth.views import login, logout_then_login usuarios.views import registro urlpatterns = patterns('', url(r'^login/$', 'django.contrib.auth.views.login', {'template_name':'registration/login.html'}, name='login'), url(r'^cerrar/$', 'django.contrib.auth.views.logout_then_login', name='logout'), url(r'^registro/$', 'registro', name='registro'), ) views.py from django.http import httpresponse, httpresponseredirect django.contrib.auth import authenticate, login, logout django.core.context_processors import csrf #importar el formulario de registro usuarios.forms import registrousuario def registro(request): if request.user.is_anonymous(): if request.method == 'post

ios - Any caveats using [UIView new];? -

being thought always use designated initializer feel bit dirty when creating new viewinstances [uiview new]; rather [[uiview alloc] initwithframe:cgrectzero]; ? is there any reason not this? there practical difference @ all? if creating new view-instance without frame information wouldn't fallback [uiview new]; cut away lot of code-cruft? guess [[uiview alloc] initwithframe:cgrectzero]; called under hood anyways(?) [uiview new] convenience method replace [[uiview alloc] init] is 1 different [[uiview alloc] initwithframe:cgrectzero] is there reason not this?` in case, i'd "yes". can't guarantee init equivalent initwithframe:cgrectzero in case. my guess ... it's possible correct , 2 act identically; isn't future proof. implementation details may change. 1. might different, don't know initwithframe: under hood.

windows phone 8 - Refresh an ObservableCollection when Item's property changed -

i have observablecollection loaded elements , displayed on ui .at same time app downloading 1 icon each element of observable collection.i display each icon when download finishes... my code working guess it's not best pratice because bind collection ui control 2 times...i pretty convinced shouldn't necessary ...i try implement inotifypropertychanged on element's icon property still have add lines of code display icons: listdocslibs = new observablecollection<bdeskdoclib>(listboxgetdocslibs); llslistdocslibs.itemssource = listdocslibs; below function dowload icons list<bdeskdoclib> listboxgetdocslibs = new list<bdeskdoclib>(); observablecollection<bdeskdoclib> listdocslibs = new observablecollection<bdeskdoclib>(); private async void loadicondoclibs() { foreach (var doclib in listboxgetdocslibs) { byte[] icon = await serverfunctions.getdoclibsicon(docli

android - How to open/display pdf without external app? -

i want display pdf file in android app without using external intent pdf viewer or else.i fount link uses external internet dont want open on internet want make user view pdf in app without using external app.. if possible please provide me pseudo code... thanks there several pdf libraries, of them can show pdf file in application. these 2 common , used. native android pdf viewer droidreader android pdf reader open source code application free download in link you'll found opensource , free download pdf libraries. and pdf-libraries

php - CodeIgniter - Page variables undefined in view -

i'm bit baffled. i'm pretty sure working before, but… this pretty basic scenario. page variables defined in controller via $data, reason they're not available in view. unless i'm going blind can't see wrong code. controller function (in full ultimate clarity): function login() { $data['page_title'] = 'login title'; $data['page_description'] = 'login description'; $data['page_keywords'] = 'login,keywords'; $data['referer'] = $this->session->flashdata('referer'); if($this->input->post('email',true) !== false) { $this->form_validation->set_rules('email', 'email', 'trim|required|xss_clean'); $this->form_validation->set_rules('password', 'password', 'trim|required|xss_clean|callback_check_password'); if($this->form_validation->run() == false) {

perl - XLSX parsing using Spreadsheet::XLSX -

i have script parsing xls like: $parser = spreadsheet::parseexcel->new( cellhandler => sub {$self->handle_cell(@_) }, notsetcell => 1 ); now modifying parse xlsx file , seems xlsx file not take parameters in new() and handle_cell function, sheet_index , workbook , $worksheet = $workbook->worksheet($sheet_index); $worksheet->row_range(); i want give parameters cellhandler , notsetcell spreadsheet::xlsx also. came know spreadsheet::xlsx doen't take parameters. have other perl module acts same spreadsheet::parseexcel parsing xlsx? please me in this. there other perl module parsing xlsx passing arguments new()? there's project started @ github: excel-reader-xlsx . isn't fancy works.

osx - Php mail() on OS X localhost keeps getting rejected as spam -

i send mails little php script on os x 10.9. mail($_post['to'], $_post['subject'], $_post['message'], "from: " . $_post['from']); the method returns true message never arrives @ inbox :( i've locked @ error messages postfix , tell me it's blocked because of spam. mar 6 11:30:38 xxxs-macbook-pro.local postfix/pickup[69960]: bb98e14dd64a: uid=70 from=<_www> mar 6 11:30:38 xxxs-macbook-pro.local postfix/cleanup[70313]: bb98e14dd64a: message-id=<20140306103038.bb98e14dd64a@xxxs- macbook-pro.local> mar 6 11:30:38 xxxs-macbook-pro.local postfix/qmgr[69961]: bb98e14dd64a: from=<_www@xxxs-macbook-pro.local>, size=384, nrcpt=1 (queue active) mar 6 11:30:39 xxxs-macbook-pro.local postfix/smtp[70315]: bb98e14dd64a: to=<xxx@xxx.com>, relay=mx3.me.com.akadns.net[17.172. 34.65]:25, delay=0.67, delays=0/0/0.53/0.14, dsn=5.7.1, status=bounced (host mx3.me.com.akadns.net[17.172.34.65] said: 550 5.7.1

sql - Postgresql: How to use "crosstab" in postgresql? -

here want print data in following form. example: callnumber1|callnumber2|call-in|call-out|sms-in|sms-out|firstcalldate|lastcalldate --------- +-------------+---------+----------+--------+---------+---------------+---- 123456 | 654321 | 1 | 2 | 1 | 1 | 2014-02-12 | 2013-03-12 23456 | 54321 | 0 | 1 | 0 | 1 | 2014-02-12 | 2013-03-12 table: table1 create table table1 ( callnumber1 int, callnumber2 int, calltype varchar, calldate date ); inserting data insert table1 values(123456,654321,'call-in','1-2-2014'); crosstab query. select * crosstab($$select callnumber1,callnumber2,calltype,calldate,count(callnumber1||callnumber2) totalcalls table1 calltype in ('call-in','call-out','sms-in','sms-out') group callnumber1,callnumber2,calltype order callnumber1,callnumber2,calltype $$, $$ values('call-in'),('call-o

ios - NSTextAttachment doesn't show on CATextLayer -

i tried on uitextview work. image left blank when use catextlayer. anyone tried before? here code tried in uiview drawrect nstextattachment* attachment = [nstextattachment new]; attachment.image = [uiimage imagenamed:@"rainbow.png"]; nsattributedstring* imagestring = [nsattributedstring attributedstringwithattachment:attachment]; nsdictionary * attribute = @{nsfontattributename: [uifont fontwithname:@"helvetica" size:12]}; nsmutableattributedstring *speechstring = [[nsmutableattributedstring alloc] initwithstring: @"hi" attributes:attribute]; [speechstring insertattributedstring:imagestring atindex:1]; [speechstring appendattributedstring:imagestring]; then add catextlayer catextlayer * speechtextlayer = [catextlayer layer]; [speechtextlayer setstring:speechstring]; [speechtextlayer setframe:self.bounds]; [speechtextlayer setbackgroundcolor:[uicolor whitecolor].cgcolor]; [self.layer addsublayer:speechtextlayer];

mysql - utf8 encoding is not working correctly in php -

i using magazine name listing program using php. here used manipulate different languages. i inserting magazine name table. field name tbl_magazine field type - varchar(32 collation utf8_general_ci when insert different languages table [using google translator]. correctly inserted db [like viewing in database সঙ্গে পরীক্ষা]. when retrieve using php record show ????? this. if know this, please me. set database connection utf8: mysql_query("set character set utf-8", $conn); mysql_query("set names utf-8", $conn); also ensure http responses interpreted utf8: header("content-type: text/html; charset=utf-8");

json - prettyPrint jsonNode in Play -

via play ws api get() response object. contains json call response.asjson() which works fine. want return json in prettyprinted version tried call json.prettyprint(response.asjson()) however not work because prettyprint expects jsvalue, not jsonnode. so question how convert jsonnode jsobject? i guessing using play java. instead of converting jsvalue, like: jsonnode node = response.asjson(); objectmapper mapper = new objectmapper(); string pretty = mapper.writerwithdefaultprettyprinter().writevalueasstring(node);

structure and pointers in C -

seg fault again!! please see , correct me typedef struct entry_s { int key; int value; struct entry_s *next1; } entry_t; entry_t *next2; next2=malloc(sizeof(entry_t)); next2->key=key; // giving seg fault now... thanks sizeof(entry_t *) gives 4 bytes nothing size of pointer. need change malloc statement this: next2=malloc(sizeof(entry_t )); after malloc add following statement. memset(next2, 0x00, sizeof(entry_t)) now not segfault.

php - How to encode HTML WYSIWYG editor CKEditor? -

i use wysiwyg editor ckeditor on site. have problem if take javascript script in editor , send these changes. shows me popup instead of show me html string. try encode text typed encodes code created editor (bold, underline). i tried use configuration using wysiwyg editor: config.htmlencodeoutput = true; by typing <script> alert ('test') </ script> in editor, displays correctly on display. if want re-edit code, wrote me in editor: &lt;script&gt;alert(&quot;test&quot;);&lt;/script&gt; do have idea how fix this? try adding code ckeditor/config.js: config.basicentities = false; config.entities = false; also make sure acf setup not strip code. more here: http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter

http - Why is jQuery performing an Ajax GET when I ask it to POST -

given simple html code: <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="scripts/jquery-1.10.2.js"></script> </head> <body> <script> $.ajax({ url: "/myurl/", data: "test", type: "post" }); </script> </body> </html> i load page fiddler observing. the http request observed rather requested post. why? so local copy of jquery 1.10.2 modified in way, maybe overwritting global ajax option make ajax requests using method. should update jq local copy or use cdn. ;)

sails.js - waterline createdAt affecting sort order -

the symptoms see after adding object viewing list ordered createdat: 'desc' , new object @ end of list should @ start of list. noticed date shown e.g. "thu mar 06 2014 10:52:56 gmt+0000 (gmt)" whereas other objects have date "2014-03-06t10:52:56.875z" . if change line in dql.js : if(self.autocreatedat) values.createdat = new date(); to var today = new date(); if(self.autocreatedat) values.createdat = today.toisostring(); then sort order comes out correctly. after restart server, values ok, presumably because data read in disk , converted somewhere. am misunderstanding in how works , how add objects via waterline? i had similar issue. if served date field date-string. i solved adding following methods model: convert date-string date-object before saving it. ... beforecreate: function(values, cb) { if(values.createdat && typeof value.createdat === 'string'){ values.createdat = new date(date.pars

html - Python and Selenium - Scrape data from multiple siblings -

okay i'm new python , of course selenium. i'm trying scrape page data , work data in python , have selenium click links , store times etc... the issue i've come across page isn't formatted way i'd like. instead of having this... title link1 link2 title2 link3 link4/a> have this <tr> <td>title<td> </tr> <tr> <td> <a href>link1</a> </td> </tr> <tr> <td> <a href>link2</a> </td> </tr> <tr> <td> <a href>link3</a> </td> </tr> heres html i'm working - http://pastebin.com/663t7mxc what i'm trying is, of links categorise them based on title come under. e.g. title link 1 link 2 title 2 link 3 link 4 link 5 title 3 link 6 and on. since links aren't children of same tag title i'm finding i

while working with java mail in jsp -

i used code here i following is, while executing got errors below 2014-03-06 16:27:33,203 - [smtpsender] smtpsender - delivery failed message from: nbarath2008@gmail.com to: nbarath2008@gmail.com - java.lang.runtimeexception: smtp response short. aborting send. response: java.lang.runtimeexception: smtp response short. aborting send. response: @ com.ericdaugherty.mail.server.services.smtp.smtpremotesender.read(smtpremotesender.java:380) @ com.ericdaugherty.mail.server.services.smtp.smtpremotesender.sendintro(smtpremotesender.java:270) @ com.ericdaugherty.mail.server.services.smtp.smtpremotesender.sendmessage(smtpremotesender.java:122) @ com.ericdaugherty.mail.server.services.smtp.smtpsender.deliverremotemessage(smtpsender.java:361) @ com.ericdaugherty.mail.server.services.smtp.smtpsender.deliver(smtpsender.java:184) @ com.ericdaugherty.mail.server.services.smtp.smtpsender.run(smtpsender.java:100) @ java.lang.thread.run(thread.java:744)` p

sharepoint - How to add Promoted links web part to page and set JSLink -

i trying deploy promoted links web par default.aspx page, following article muawiyah shannak http://code.msdn.microsoft.com/office/sharepoint-2013-how-to-add-e2966a24#content cant find out how set jslink url in markup. <div> <webpartpages:webpartzone id="webpartzone" runat="server" frametype="none"> <webpartpages:xsltlistviewwebpart id="xsltlistviewarticlepromotedlist" runat="server" listurl="lists/mypromotedlinks" isincluded="true" nodefaultstyle="true" title="images used in switcher" pagetype="page_normalview" default="false" viewcontenttypeid="0x"> </webpartpages:xsltlistviewwebpart> </webpartpages:webpartzone> </div>

linux - A font doesn't appear in IntelliJ's dialog of choosing a font -

Image
i installed monaco font using code . however, doesn't appear in setting -> editor -> color , fonts -> font . should do? try install fonts way. use font viewer . can easy install font. i use idea under elementaryos , work me. update:

Shell script calling ssh: how to interpret wildcard on remote server -

i work on customer environment on daily basis, comprised of 5 aix servers, , need issue same command on 5 of them. so set ssh key-based authentication between servers, , whipped little ksh script broadcasts command of them: #!/usr/bin/ksh if [[ $# -eq 0 ]]; print "broadcast.ksh - broadcasts command 5 xxxxxxxx environments , returns output each" print "usage: ./broadcast.ksh command_to_issue" exit fi set -a cust_hosts aaa bbb ccc ddd eee host in ${cust_hosts[@]}; echo "============ $host ================" if [[ `uname -n` = $host ]]; $* continue fi ssh $host $* done echo "=========================================" echo "finished" now, works fine, until want use wildcard on remote end, like: ./broadcast.ksh ls -l java* since '*' expanded on local system opposed remote. now, if using ssh remote commands

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -

in order write simple nodejs app talking server written in java have implement following functionality nodejs. public class crypto { cipher decipher; byte[] salt = { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0x04, (byte) 0x0a, (byte) 0x0b, (byte) 0x0c, (byte) 0x0d }; int iterationcount = 10; public crypto(string pass) { try { keyspec keyspec = new pbekeyspec(pass.tochararray(), salt, iterationcount); secretkey key = secretkeyfactory.getinstance( "pbewithmd5andtripledes").generatesecret(keyspec); ecipher = cipher.getinstance("pbewithmd5andtripledes/cbc/pkcs5padding"); algorithmparameterspec paramspec = new pbeparameterspec(salt, iterationcount); decipher.init(cipher.decrypt_mode, key, paramspec); } catch (exception ex) { } } } i use crypto module of nodejs var crypto = require('crypto'), pass = new buffer(wek), salt = new buffer([0x01, 0x02, 0x03, 0x0