Posts

Showing posts from August, 2011

javascript - How to override CSS3 animation with jQuery? -

i have animation on couple of elements last few seconds. when hover on 1 of them, want css3 animation pause , something, , when hover comes off, continue animation. here quick example fiddle shows css3 animation happening, , when hover on third bar (with class .test) should override css: http://jsfiddle.net/tmffx/ @keyframes animation { { width: 0;} {width: 200px;} } @-webkit-keyframes animation { { width: 0;} {width: 100%;} } div { animation: animation 3s; -webkit-animation: animation 3s; display:block; height:50px; background:red; margin-bottom:20px; } .change {width: 50%;} $('.test').hover( function() { $(this).toggleclass('change'); }); any ideas how this? hope help. $('.test').hover( function(){ $('div').css("-webkit-animation-play-state", "paused"); //do stuff here }, function(){ $('div').css("-webkit-anima

Java XML dom: prevent collapsing empty element -

i use javax.xml.parsers.documentbuilder , , want write org.w3c.dom.document file. if there empty element, default output collapsed: <element/> can change behavior doesn't collapse element? i.e.: <element></element> thanks help. this actualy depends on way how you're writing document file , has nothing dom itself. following example uses popular transformer-based approach: documentbuilderfactory factory = documentbuilderfactory.newinstance(); document document = factory.newdocumentbuilder().newdocument(); element element = document.createelement("tag"); document.appendchild(element); transformerfactory transformerfactory = transformerfactory.newinstance(); transformer transformer = transformerfactory.newtransformer(); transformer.setoutputproperty(outputkeys.method, "html"); domsource sourc

tsql - SQL Split Function and Ordering Issue? -

i have following split function, alter function [dbo].[split](@string varchar(8000), @delimiter char(1)) returns @temptable table (items varchar(8000)) begin set @string = rtrim(ltrim(@string)) declare @idx int declare @slice varchar(8000) select @idx = 1 if len(@string)<1 or @string null return while @idx!= 0 begin set @idx = charindex(@delimiter,@string) if @idx!=0 set @slice = left(@string,@idx - 1) else set @slice = @string if(len(@slice)>0) insert @temptable(items) values(@slice) set @string = right(@string,len(@string) - @idx) if len(@string)

c++ - vector push_back doesn't work -

i created simple code, push_back function doesn't want work. gives me absolutely different result expected. here code: std::vector<std::string> words; std::ifstream infile ("words.txt"); std::string temp; while (std::getline(infile, temp)) { words.push_back(temp); } (std::size_t = 0; < words.size(); i++) { std::cout << words[i] << " "; } the "words.txt" file contains 4 words: window tyre give speaker the result supposed "window tyre give speaker", me " speaker". problem? this proved underlying problem: have tried dumping input file (e.g. hexdump -c or similar) check rogue control sequences such \r might explain behaviour seeing. your input file might text file dos/windows-like system , might using unix-like system.

styles - Android edit-text styling -

Image
i'm new android programming, i've styled buttons , textfield in web application using stylesheet, how can in andoid, can please tell me how create edittext shown below image in android. how can style edittext in android. i suggest use image background edittext. don't believe can done in xml.

ios - Is it required to add a corelocation framework in my project, if I am using it in my own framework -

i using corelocationframework in custom framework created,after integrating framework project got below error after running application undefined symbols architecture i386: "_objc_class_$_cllocationmanager", referenced from: objc-class-ref in myframework "_kcllocationaccuracybest", referenced from: -[utility getcurrentlocation] in myframework ld: symbol(s) not found architecture i386 clang: error: linker command failed exit code 1 (use -v see invocation) after added same corelocationframework in project error not comming code working. so want know reason behind , happened if added other frameworks also? any time building static library or framework relies on framework, have link framework framework , final project well. if publishing framework somewhere other people use, should have instructions state after install framework, must link corelocation well. example: myframework --> frameworks --> corelocation.framework

python - CSS Table style in Django isn't showing the table design -

Image
i have problem 1 of design in django template, other designs working fine table css code not working i'm attaching part of css code , relevant part djnago template. my css file: * { margin: 0; padding: 0; } body { text-align: justify; font-family: arial, helvetica, sans-serif; font-size: 13px; color: #333333; } table.gridtable { font-family: verdana,arial,sans-serif; font-size:11px; color:#333333; border: 1px #666666; border-collapse: collapse; } table.gridtable th { padding: 8px; border: 1px solid #666666; background-color: #dedede; } table.gridtable td { padding: 8px; border: 1px solid #666666; background-color: #ffffff; } form { } input, textarea { padding: 2px 5px; font: normal 1em "trebuchet ms", arial, helvetica, sans-serif; color: #333333; } ........ code in django template: ......... <div id="latest-post-wrap"> <div id="latest-post" clas

sql - MySql WorkBench "Execute Query into Text Output" option not showing full result -

i have executed following in execute query text output mysql workbench 5.2.4 version. it not showing full output., answer set trimmed. show create table the_re.user_list; + ---------- + ----------------- + | table | create table | + ---------- + ----------------- + | user_list | create table `user_list` ( `unique_id` bigint(20) not null auto_increment, `date_` date not null, `id` bigint(20) not null, `start_` date not null, `t_time` time default null, `d_date` date not null, `d_tim... | + ---------- + ----------------- + the above result ends following statement. there few more texts missing after this. `d_tim... | could please tell me how display full result text need execute 'n' query result in single text output? update latest version (6.0.7 atm). for getting create statements can right click on table in schema tree , choose "send sql editor.." -> "create statement".

Meteor - delete from session on page change/reload -

how deal "volatile" values in session? example, hold form validation errors in session. don't want them there on page refresh or after changing pages. session variables not survive manual page refresh (ctrl+r). if want variables cleared after page transition put clearing code in router or in template's destroyed callback (i typically choose latter). example if have template called signin do: template.signin.destroyed = function(){ session.set('signinvalidationerrors', null); } whenever naviate away signin page (the template destroyed), clear signinvalidationerrors .

java - Illegal start of expression string -

i trying make program reverses text lines in file. still learning java , new this. program erroring because made variable inside loop , tried access outside. tried adding preffix "public" before declaring string variable when try compile it points "public" , says illegal start of expression. can please tell me why erroring , or how fix it. import java.io.*; import java.util.*; public class filereverser { public static void main(string[] args) throws filenotfoundexception { scanner console = new scanner(system.in); system.out.print("file reverse: "); string inputfilename = console.next(); system.out.print("output file: "); string outputfilename = console.next(); filereader reader = new filereader(inputfilename); scanner in = new scanner(reader); printwriter out = new printwriter(outputfilename); int number = 0; while (in.hasnextline()) { string line = in.nextl

date - bat file read in file -

i have text file datefile.txt contains 10-06-2013 and tried read using following bat file: @echo off setlocal disabledelayedexpansion /f "usebackq delims=" %%a in (`"findstr /n ^^ datefile.txt"`) ( set "var=%%a" setlocal enabledelayedexpansion set "var=!var:*:=!" echo(!var! endlocal ) echo %var% the output got these: 10/06/2013 1:10/06/2013 how come %var% different above one. or how remove "1:" in %var%? thanks. you got type of output, first line written echo(!var! . second line echo %var% , in second case variable doesn't contain same. this because setlocal/endlocal block inside loop. in case can remove block, date doesn't contains exclamation marks nor carets. @echo off setlocal enabledelayedexpansion /f "usebackq delims=" %%a in (`"findstr /n ^^ datefile.txt"`) ( set "var=%%a" set "var=!var:*:=!" echo(!var! ) echo %var%

c# - How to load fbx model to XNA? -

Image
i new xna, , try load model, not loaded properly. the model looks in visual studio: and looks when try display: my code this: matrix[] transforms = new matrix[billiardtable.bones.count]; this.billiardtable.copyabsolutebonetransformsto(transforms); foreach (modelmesh mesh in this.billiardtable.meshes) { foreach (basiceffect effect in mesh.effects) { effect.enabledefaultlighting(); effect.world = transforms[mesh.parentbone.index] * matrix.createrotationx(120) * matrix.createtranslation(vector3.zero); effect.view = matrix.createlookat(balls.first().cameraposition, vector3.zero, vector3.up); effect.projection = matrix.createperspectivefieldofview( mathhelper.toradians(45.0f), balls.first().aspectratio, 1.0f, 10000.0f); } mesh.draw()

Laravel 4 and jQuery Select2: Old Input -

i'm trying pass old input select2 component, select2 doesn't pick up. (note: i'm using twigbridge) <select ... value="{{ input_old('fiscal_year_span') }}"> ... options ... </select> the options have set value names, , laravel send old value back. (i hope don't need js...) it looks you're adding value param select tag, vs selected param option tag. see here: https://developer.mozilla.org/en-us/docs/web/html/element/select

c++ - Android ndk-r9 compiler optimization issues -

i switched using android ndk-r9 , having difficulty app seems related compiler optimization. have following function: int gettouchpos(gtouchevents * pevents, gpointf * ppos, int * pbutton = 0) { int count = 0; gtouchevent * pevent; if (pevents->getcount(&count) == gresult_ok) { gdebuglog((gs("gettouchpos: count = %d"), count)); if (pevents->getevent(0, &pevent) == gresult_ok) { pevent->gettappos(ppos); if (pbutton) { pevent->getbutton(pbutton); } pevent->release(); } } return(count); } if build project , run it, call gdebuglog formats , logs value of variable 'count'. when this, 'count' 1 , app works correctly. if comment out gdebuglog line (and make no other changes), when run app, no longer works. in function gtouchevents::getcount, logging returning , value

Tomcat 8 JSR 356 WebSocket Threading -

i'm using jsr-356 websocket support in tomcat 8 drive application i'm working on. far, looks messages handled in single thread. while understand reasoning behind - , why websockets implemented way, there way use executorservice handling message comes in (without creating executorservice in code)? this allow scalability of having 1 (or few) network selector threads (to support large number of connected clients), while allowing standard thread-based processing of actual message (when message needs processed client). i don't see in particular allow changed. the threading model varies depending on connector using. scalability want use nio (the default) or apr/native (buggy of 8.0.0-rc3). nio choice @ moment. apr/native issues should fixed shortly (i working on when saw question). nio uses selector , thread pool handle received messages. when selector detects data available passes socket thread thread pool (via executor) process it. processing may result in d

symfony - Sonata Admin configureListFields -

is possible make custom query in sonataadmin in configurelistfields ? . in function : protected function configurelistfields(listmapper $listmapper) { $listmapper ->>add(.... ; } thank ! you should override createquery method ( source ): public function createquery($context = 'list') { $query = parent::createquery($context); // queryproxy, can call call on doctrine orm querybuilder $query->andwhere( $query->expr()->eq($query->getrootalias().'.username', ':username') ); $query->setparameter('username', 'test'); // eg security context return $query; } afaik, cannot change select part of query , cannot use group by , because internally sonata runs query @ least 2 times. first, checks how many rows query returns. second, runs query paginated.

c++ - invalid types 'float*[float]' for array subscript -

#include <iostream> using namespace std; float n; float fact(float m) { float prod=1; while(m>1) { prod*=m; m--; } return prod; } //////////////////////////////// float min(float b[],float n) { float small=999999999999; for(float f=0;f<n;f++) if(b[f]<small) small=b[f]; return small; } ///////////////////////////////// float max(float a[],float n) { float small=-999999999999; for(float i=0;i<n;i++) if(a[i]>small) small=a[i]; return small; } ////////////////////////////////////// float sum(float a[],float n) {float sum=0; for(float i=0;i<n;++i) sum+=a[i]; return sum; } int main() { float t,q2,count=0; scanf("%d",t); float *n=new float[t]; float *m=new float[t]; float *q=new float[t]; float *k=new float[t]; for(float p=0;p<t;++p)

Seemingly random opendir() failure C -

so i've written short c program explores files on computer file. wrote simple function takes directory, opens looks around: int exploredir (char stringdir[], char search[]) { dir* dir; struct dirent* ent; if ((dir = opendir(stringdir)) == null) { printf("error: not open directory %s\n", stringdir); return 0; } while ((ent = readdir(dir)) != null) { if(strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) continue; if (strlen(stringdir) + 1 + strlen(ent->d_name) > 1024) { perror("\nerror: file path long!\n"); continue; } char filepath[1024]; strcpy(filepath, stringdir); strcat(filepath, "/"); strcat(filepath, ent->d_name); if (strcmp(ent->d_name, search) == 0) { printf(" found it! it's at:

c# - Code Access Security exception in restricted AppDomain -

goal : need run code in appdomain limited permissions - should have no access @ fancy or unsafe, except few helper methods have defined elsewhere. what i've done : i'm creating sandbox appdomain required basic permissions, , creating proxy object, runs code: static appdomain createsandbox() { var e = new evidence(); e.addhostevidence(new zone(securityzone.internet)); var ps = securitymanager.getstandardsandbox(e); var security = new securitypermission(securitypermissionflag.execution); ps.addpermission(security); var setup = new appdomainsetup { applicationbase = path.getdirectoryname(assembly.getexecutingassembly().location) }; return appdomain.createdomain("sandbox" + datetime.now, null, setup, ps); } public class proxy : marshalbyrefobject { public proxy() { } public dostuff() { // perform custom operation requiring permission helperassembly.helpermethods.method1(); // other s

I'm stuck at slick graphics -

i'm trying make game, using slick2d, , lwjgl. don't why code doesn't work firststage.java package net.charlesdickenson; import org.newdawn.slick.gamecontainer; import org.newdawn.slick.graphics; import org.newdawn.slick.image; import org.newdawn.slick.slickexception; import org.newdawn.slick.state.basicgamestate; import org.newdawn.slick.state.statebasedgame; public class firststage extends basicgamestate { public bossvar bosschecker() { if(isbeforemiddleboss) return bossvar.beforeboss; if(ismiddleboss) return bossvar.middle; if(isbeforeboss) return bossvar.beforeboss; if(isboss) return bossvar.boss; return null; } @suppresswarnings("static-access") public firststage(int state) { this.state = state; } @override public void init(gamecontainer _arg0, statebasedgame _arg1) throws slickexception { scoreboard = new image("res/scoreboard.png");

java - how to run a jar file from a matlab code? -

if have .jar file takes 2 command line arguments. how can call matlab .m file? can call jar file command line this: jar -jar art.jar ex.xls 0 you can use system() function. e.g.: [status result] = system('java -jar art.jar ex.xls 0'); if need pass variables parameters, have convert them strings , concatenate them (with space separator). e.g.: jarfile = 'art.jar'; xlsfile = 'ex.xls'; n = 0; commandtext = ['java -jar ' jarfile ' ' xlsfile ' ' num2str(n)]; system(commandtext);

java - Hibernate mutiple relationships doesn't work -

when create 2 one-to-one relationships in end 1 of 2 saved other 1 becomes null. in sql trace can see mfuitvoeringjoin saves 2 id's when should saving 3 :s is there wrong here? @entity @table(name = "stud1630651.mfuitvoering") public class uitvoering { @id @generatedvalue(strategy=generationtype.auto, generator="my_entity_seq_gen") @sequencegenerator(name="my_entity_seq_gen", sequencename="hibernate_sequence_uitvoering") @column(name = "id") private int id; @column(name = "datum") private string datum; @column(name = "schouwburg") private string schouwburg; @onetoone(cascade=cascadetype.all) @jointable(name="mfuitvoeringjoin",joincolumns= {@joincolumn(name="uitvoeringid")}, inversejoincolumns={@joincolumn(name="dirigentid")}) private dirigent dirigent; @onetoone(cascade=cascadetype.all) @jointable(name="mfuitvoeringjoin",joincolumns= {@joincolumn(name=&qu

Converting Pseudo Code To Python -

i trying convert pseudo code python. have no clue on how this. looks simple have no knowledge of python, making impossible me do. pseudo code: main module declare option declare value declare cost while(choice ==’y’) write “vehicle shipping rates africa” write “1. car ghana” write “2. van nigeria” write “3. truck togo” write “4. van kenya” write “5. truck somalia” write “enter choice:” option write “enter car price:” value if ( option = 1) cost = value / 0.30; write “it cost $”+cost "to ship car cost $” +value+" ghana." else if (option = 2) cost = value / 0.20; write “it cost $”+cost "to ship car cost $” +value+" nigeria." else if ( option = 3) cost = value / 0.33; write “it cost $”+cost "to ship car cost $” +value+" togo." else if (option = 4) cost = value / 0.17; write “it cost $”+cost "to ship car cost $” +value+" kenya." else if ( option = 5) cost = value / 0.31; write “it cost $”+cos

javascript - Image Slider Non working right -

the code below dose not work right. want image slider changes every 5 seconds, if hover on it stop , when leave starts again. when click on it change. can make change every 5 seconds, , change when click, cant stop when hover. $('document').ready(function() { var img = 0; var pic = ['nature', 'grass', 'earth', 'fall', 'fall2']; var slider = 'img.slide_img'; // html image function slide() { $(slider).attr('src', 'pictures/' + pic[img] + '.jpg'); img++; if (img >= pic.length) { img = 0; } } $(slider).on('mouseleave', function() { auto(3000); }); $(slider).on('click', function() { slide(); }); function auto(time) { setinterval(function() { slide(); }, time) } }); there's bunch of problems: you don't initialise setinterval start

PHP include file with numbers -

i want include files in webpage, pages this: new1.php new2.php the number increasing , want include files new(a number).php don't know how , can't find elsewhere. now have : <?php include('includes/new1.php'); ?> <?php include('includes/new2.php'); ?> <?php include('includes/new3.php'); ?> <?php include('includes/new4.php'); ?> but lot of work include them hand. there way include files without doing lot of work? thanks in advance! this include 10 files you. for ($i = 1 ; $i <= 10 ; $i++){ include("includes/new{$i}.php"); } also, specify numbers in array if have no common pattern or order. $numbers = array(1, 15, 12, 35, 234) ; foreach($numbers $number){ include("includes/new{$number}.php"); }

c++ - Create class instance based on a string input -

background: in game engine have generic 'script parser' used create game entities parsing script file. in code have myentity* entity = myscriptparer::parse("filename.scr"); any class scriptable inherits generic base class. internally in game engine there specific classes use - particles, fonts etc , works nicely in parser - see extract below std::string line; std::getline(ifs, line); if (line == "[font]") { cfont* f = new cfont(); f->readobject(ifs); } else if (line == "[particle]") { cparticle* p = new cparticle(); p->readobject(ifs); } ... my problem comes how handle user defined classes i.e classes in games use game engine. base class has abstract method readobject inherits must implement method. the issue how parser know new class? e.g have cvehicle class parser need know recognise "[vehicle]" , able create new cvehicle is there way store class type or in array/map maybe have function register

clr - Are arrays in Mono naturally aligned? -

what situation alignment of arrays in mono implementation of clr? guaranteed naturally aligned on platforms? if no, on platforms safe assume natural alignment of clr-managed arrays? there 2 related questions on so: alignment of arrays in .net answer describes alignment guarantees of ecma-335 standard are arrays in .net naturally aligned? answer described alignment guarantees of microsoft .net framework i looking similar information on mono framework. for long , double arrays, guarantee array elements naturally aligned on 64 bit platforms. on 32 bit platforms happen naturally aligned, , unlikely change since 32 bit architectures require doubles aligned , we'll keep code consistent on them. note want library support processing starting @ index in array , since you're using simd instructions require 16 byte alignment, need check , scalar processing @ start/end of data anyway. as long , double fields inside structs/classes, alignment not guaranteed on

module - trigger.io topbar issue IOS -

the current module top bar breaks in ios 6, reverting previous version makes work again not work in ios 7. what see when open app new topbar , tabbar "hide" command not seem hiding header , footer, causing them show while loading screen still showing (this happens in both ios 6 , 7), seem hide after few seconds once app loaded. next topbar not seem tinted (stays black ) in ios 6 , webview seems off, in ios 7 seems ok 6 not working. edit 1: after doing additonal research seems app crashing , throwing error. oct 6 16:29:33 michaels-iphone forge[341] : * terminating app due uncaught exception 'nsinvalidargumentexception', reason: '* -[__nsplaceholderdictionary initwit this app has been working fine on pervious versions , reason crashing edit 2: so seems there problem both header , footer modules (topbar , tabbar) ios 6 not working correctly. if revert them previous version work fine ios (will testing 7 soon) next error getting seemed crashing

node.js - Not a string or buffer. Module Crypto -

i created on module util.js function myhash() reuse in different parts of code not working. error message: this._binding.update(data, encoding); not string or buffer. app.js ... global.util = require('./util'); global.dateformat = util.dateformat; global.myhash = util.myhash; /***** function *****/ ... app.post('/test', function(req, res){ ... var pass_shasum = myhash('test'); ... util.js var crypto = require('crypto'); function myhash(msg) { return crypto.createhash('sha256').update(msg).digest('hex'); } exports.util = { ... myhash: myhash(), ... }; any suggestions? solution: modify util.js var crypto = require('crypto'); /* define var */ var myhash = function (msg) { return crypto.createhash('sha256').update(msg).digest('hex'); }; module.exports = { ... myhash: myhash, /* variable not method. @robertklep */ ... }; you shouldn't ex

html - Margin 0 Auto kicking float:right to a new line -

hey guys i'm trying align 3 boxes horizontally little bit of white space in between. tried using float:left first box margin:auto middle 1 , float:right last box. first 2 boxes display fine third 1 floats right on new line. there anyway fix this? thanks! html: <div class="boxq"> <p class="boxtext">quality.</p> </div> <div class="boxs"> <p class="boxtext">speed.</p> </div> <div class="boxsim"> <p class="boxtext">simplicity.</p> </div> css: .boxq { float:left; width:30%; height:400px; background-color:#c60; } .boxs { margin: 0 auto; width:30%; height:400px; background-color:#6cc; } .boxsim { float:right; width:30%; height:400px; background-color:#fc6; } just re-order divs (no css changes needed) be: <div class="boxq">

jquery - How to find the last row in jqgrid -

currently i'm working on jqgrid, have find out last row , implement ctrl down functionality. not able last row. needed 1 here. thanks in advance if grid id example list following expression should return last row: $("#list").find(">tbody>tr.jqgrow:last"); or $("#list").find(">tbody>tr.jqgrow").filter(":last"); one more, event better, way last row following var rows = $("#list")[0].rows, lastrowdom = rows[rows.length-1]; it uses rows collection of dom representation of <table> . value $(lastrowdom) same $("#list").find(">tbody>tr.jqgrow").filter(":last") .

Plot rows of numbers that fall within a defined proximity to other rows in R -

i have dataframe of numbers (genetics data) on different chromosomes can considered factors separate numbers on. looks (with adjacent columns containing sample info each position): awk '{print $2 "\t" $3}' log_values | head chr start sample1 sample2 1 102447376 0.46957632 0.38415043 1 102447536 0.49194950 0.30094824 1 102447366 0.49874880 -0.17675325 2 102447366 -0.01910729 0.20264680 1 108332063 -0.03295081 0.07738970 1 109472445 0.02216355 -0.02495788 what want make series of plots taking values other columns in file. instead of plotting 1 each row (which represent results in different region and/or different sample), want draw plots covering ranges if there values in start column close enough each other. start, plot made if there 3 values in start column within 1000 of each other. is, 1000 b c inclusive b <= 1000 , b c <= 1000 c not have <= 1000. in code below, 1000 "cnv_size". "flanking_size" var

javascript - css transitions affecting previously modified css properties -

i have script applies css styles element, adds transition style element, , applies css style element. i'm trying have element styles applied instantly, , animate next change. code basic, set styles, set transition styles, set final styles. i'm experiencing first property being changed (the 1 without transition) having transition applied it, though not set transition property until afterwards. have double checked element not have transition property applied it. why this? also, if leave 50 millisecond delay between applying first styles , transition, works expected. you have force relayout after first styles applied (so processed without transitions) , can apply styles lead transition. way doing now, opeartions being collapsed 1 operation , undergoing transitions. the simplest way relayout apply first css properties, settimeout(fn, 1) apply second set of properties in timer callback. there other ways force relayout requesting properties trigger relayout. don&

How to compile vim 64-bit on windows using MinGW-64? -

i tried compile vim 64-bit on windows. don't know how use mingw-64. there's mingw-32-make in 32-bit version, use build. didn't find 'make' program in 64-bit mingw. please tell me how use mingw-64, or tutorial follow? thank you. it not matter source make program comes, must able execute makefile. compile vim mingw specific compiler , make_ming.mak makefile used use following: export environment variable cc set appropriate compiler (in case 32-bit named i686-pc-mingw32-gcc ). export environment variable ld set appropriate linker (in case similar, -ld suffix in place of -gcc ). sure found on $path : not sure kind of escaping should make makefile work avoid necessity escaping. export environment variable prefix pointing directory mingw resides (in case /usr/i686-mingw32 : cross-compiling). export environment variable vim_cv_toupper_broken set yes . not sure why did this. finally run make: cd {path/to/vim/repository}/src make -f make_ming.m

ip - Winsock2 non-local refused -

(i have not put code in question since actual code doesn't matter here. if though can edit question later put in.) i'm new using winsock2 or other networking api matter. have simple server application , client application in server sends string client , disconnects. the applications work fine when use localhost or 127.0.0.1 inet_addr() argument, when use "real" ip, client application gets wsaeconnrefused , server doesn't see it. made sure port same both applications , protocol same. [edit] have come issue after abandoning networking while. think may have fact using router, , not in code. wsaeconnrefused active refusal of connection peer or intermediate firewall. if peer issued it, means got ip address or port wrong, or else got right server isn't running; anyway, nothing listening @ ip:port. if firewall, adjust it. did use htons() on port number?

wcf - 405 Method Not Allowed - Dynamics GP 2010 Web Service -

Image
i trying access client's gp 2010 web service, error: the request failed http status 405: method not allowed . the url http://www.xyz.com:48620/dynamics/gpservice in visual studio, see url in add web reference box: xyz:48620/metadata/wcf/full/schemas.microsoft.com.dynamics.gp.2010.01.wsdl when visit url in browser, can see wsdl: here wsdl code: http://pastebin.com/0vu7zrbe the customer has installed gp2010 web service , appears in browser. cannot add reference in visual studio. customer has added inbound , outbound firewall rule. am using wrong url or there else install? when add web reference, add localhost:48620/dynamics/gpservice . if need authenticate one, add change url: // create instance of service dynamicsgp.core.dynamicsgpservice.dynamicsgp wsdynamicsgp = new dynamicsgp.core.dynamicsgpservice.dynamicsgp(); wsdynamicsgp.url = "http://www.mysite.com:48620/dynamicsgpwebservices/dynamicsgpservice.asmx"; /

python - WxPython Grid: Clear Selected Row Data Based upon Popup Menu Selection -

i have wxpython grid trying clear data of current row based upon popup menu selection. binded popup menu definition clear data when click on selection nothing happens. here code snippet. def clearcurrentrow(self,event): self.grid.selectrow(self.grid.getgridcursorrow(),true) self.grid.clearselection() any suggestions appreciated. clear selection unselects row, might find quickest delete row , insert new one.

ruby on rails - Capistrano Cap Deploy issue with RVMRC -

so run cap deploy try , deploy ec2, , issue: ** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] * rvm has encountered new or modified .rvmrc file in current * ** * directory, shell script , therefore may contain shell * ** * commands. * ** * * ** * examine contents of file sure contents * ** * safe before trusting it! * ** * wish trust '/var/www/highlandsfbart#/shared/cached-copy/.rvmrc'? * ** * choose v[iew] below view contents * ** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] ****************************************************************************** ** [ec2-54-200-24-60.us-west-2.compute.amazonaws.com :: out] y[es], n[o], v[iew], c[ancel]> however, when type y , press enter, hangs , nothing

java - Not Able To Insert multiple values into mongodb -

i able insert first values mongodb.how can edit code insert values loop mongodb below code. public class formatdriver extends configured implements tool{ //my code public static void main(string[] args) throws exception { try{ /*connection mongodb*/ while((clusterdata = cluster.readline())!= null){ string[] str_array = clusterdata.split("\\["); string star_tstr = str_array[0]; string end_str = str_array[1]; string end_array[] = end_str.split(","); basicdbobject book = new basicdbobject(); for(int k=0 ; k < doc_array.length ; k++){ /*formating output*/ if(k%2 == 0){ if(end_array[0].equals(doc_array[k])){ end_array[0] = doc_array[k+1]; book.put("docname",end_array[0]); //value1 book.put("clusterno",s

iphone - Flurry (SDK 4.2.4) integration not working in Xcode 5, iOS7 -

Image
context using xcode 5 have added systemconfiguration.framework have added flurry folder frameworks folder of project trying build project publshing error: steps taken try fix searched stack overflow searched flurry support added , removed systemconfiguration.framework cleaned , built xcode restarted xcode update i believe issue settings architecture, when set armv7 compiler quit complaining. just add ​security.framework​ too, , should work.

how to remove css using jquery without specify the full file name -

i have requirement of removing css file if contains jquery in name. so if css file eg: jquerycustom.css , should removed reference. so how extend below achieve requirement? $(this).removeclass('someclass'); $("link[href*=jquery][rel=stylesheet]").attr('disabled', 'disabled'); or $("link[href*=jquery][rel=stylesheet]").remove();

winapi - SHBrowseForFolder not returning Selected folder string by reference -

hello there i'm working on windows application using windows api ms vc++ 2010 , have following code selecting folders: bool browsefolder(tchar *result) { browseinfo brwinfo = { 0 }; brwinfo.lpsztitle = _t("select source directory"); brwinfo.hwndowner = hwnd; lpitemidlist pitemidl = shbrowseforfolder (&brwinfo); if (pitemidl == 0) return false; // full path of folder tchar path[max_path]; if (shgetpathfromidlist (pitemidl, path)) result = path; imalloc *pmalloc = 0; if (succeeded(shgetmalloc(&pmalloc))) { pmalloc->free(pitemidl); pmalloc->release(); } ::messagebox(hwnd, result, "input", mb_ok); ::messagebox(hwnd, inputfolder, "input", mb_ok); // reference test return true; } so, opens browse folder dialog, saves selected folder string in reference parameter "result" , returns true if ok. later call: browsefolder(inputfolder); and when t

ios - How to sort NSArray of custom objects by a specific property in descending order? -

how make piece of code order in descending order. code gives me array in ascending order: nsarray *sortedproductsbystyle = [unsortedproducts sortedarrayusingcomparator: ^(product *p1, product *p2) { return [p1.productstyle compare:p2.productstyle options:nsnumericsearch]; }]; i thought using nsordereddescending work didn't: nsarray *sortedproductsbystyle = [unsortedproducts sortedarrayusingcomparator: ^(product *p1, product *p2) { return [p1.productstyle compare:p2.productstyle options:nsnumericsearch | nsordereddescending]; }]; any ideas? how inverting compare order? nsarray *sortedproductsbystyle = [unsortedproducts sortedarrayusingcomparator: ^(product *p1, product *p2) { return [p2.productstyle compare:p1.productstyle options:nsnumericsearch]; }];

What is the use of passing object to another class reference in java? -

for example: foo ab=new dog(); saving object of type class reference of class! it's not necessary foo foo = new bar() it's recommendable refer interface , not implementation. way can change implementation without needing change other code. example if you're doing lists , use arraylists might do: arraylist<integer> numbers = new arraylist<>(); //do stuff numbers however might not care kind of list you're better off with list<integer> numbers = new arraylist<>(); //do stuff numbers now doesn't matter kind of list you've got , maybe find you'll better performance linkedlist , can use instead of changing other code. i polymorphism important when receiving objects other callers though.

c - int i in a for loop vs not -

why following not work when defined in loop #include <stdio.h> #include <math.h> int n; long long int h() { long long int ans=0; int i, lt; if(n <= 0) return 0; for(i=1, lt=sqrt(n); i<=lt; i+=1) /* if i=1 replaced int i=1 => garbage */ ans+=(n/i); ans = 2*ans-(lt*lt); return ans; } int main() { scanf("%d",&n); printf("%lld\n",h()); return 0; } output when it's defined @ top input: 8 output: 20 output when it's defined in loop /* (int i=1 ..) */ input: 8 output: 1243068212 i see warning lt initialized when used here , why? when write this: int lt; (int i=1, lt=sqrt(n); ...) that defines two new inner variables named i , lt ; in particular, new lt variable shadows outer one, making temporarily inaccessible within inner scope. so, outer lt variable never gets initialized, , when compute ans = 2*ans-(lt*lt) , it's using uninitialized value c