Posts

Showing posts from June, 2013

internet explorer - Javascript: Inconsistency when assigning a named function to a variable (named function expression) -

internet explorer - Javascript: Inconsistency when assigning a named function to a variable (named function expression) - can explain difference in behaviour between net explorer , firefox in regards below: var mynamespace = (function () { var exposed = {}; exposed.myfunction = function myfunction () { homecoming "works!"; } console.log(myfunction()); // ie: "works!" // firefox: referenceerror: myfunction not defined console.log(exposed.myfunction()); // ie: "works!" // ff: "works!" homecoming exposed; })(); console.log(mynamespace.myfunction()); // ie: "works!" // ff: "works!" in net explorer method allows me phone call function within namespace function using either myfunction() or exposed.myfunction() . outside namepsace function can utilize mynamespace.myfunction() in firefox, results same exception of bare named function phone call not work. should work? if shouldn...

asp.net mvc - Model is Not Valid -

asp.net mvc - Model is Not Valid - i creating registration form. had property national identity number. want user fill after confirm registration. dont write in registration form. commented @* national identity number <div class="editor-field"> @html.editorfor(model => model.identitynumber) @html.validationmessagefor(model => model.identitynumber) </div>*@ and property [identitynumber("it not valid identity number")] [required(errormessage = "you have come in national number")] [displayname("national identity number:")] public string identitynumber { get; set; } but doesnt work. found out reasons attribute [identitynumber] , [required] attribute. if comment them, public actionresult register(member model) { if (modelstate.isvalid) { ..... modelstate.isvalid false. if uncomment it, returns true. must alter allow it? mean, w...

c# - Flush grid layout of buttons in .Net for Windows Store App -

c# - Flush grid layout of buttons in .Net for Windows Store App - i have grid of objects generating programmatically. for testing purposes, each cell in grid border object kid image object. each cell placed flush against it's neighbour , displays perfectly. when replace each image object button object (each cell still border object, button kid rather image), noticeable gap appears between cells. i have tried setting margin, padding, et al 0. what unique buttons makes them behave way, , how can overcome it? margin defined in command template. can alter next these steps: right click on button in designer , select edit template > edit copy... context menu. in dialog select name new style , take want set it. now find next block of xaml in style , set margin 0 . <border x:name="border" borderbrush="{templatebinding borderbrush}" borderthickness="{templatebinding borderthickness}" background="{templat...

html - Please Help... unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/manseld/public_html/scripts/Start.php on line 23 -

html - Please Help... unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/manseld/public_html/scripts/Start.php on line 23 - i'm getting error: parse error: syntax error, unexpected t_constant_encapsed_string, expecting ',' or ';' in /home/manseld/public_html/scripts/start.php on line 23 this code on website: <?php include('/home/manseld/public_html/scripts/config.php'); $name = stripslashes($_get['n']); $height = stripslashes($_get['h']); $width = stripslashes($_get['w']); echo '<?php include('/home/manseld/public_html/scripts/config.php'); ?> <title><?php echo "$title"; ?></title> <head> <link href="/stylesheets/stylesheet1.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="<?php echo "$favicon"; ?>"/> <div style="text-align:ce...

c# - Set assembly level attribute conditionally -

c# - Set assembly level attribute conditionally - i set assembly level attribute conditionally based on value read config file. possible? i read attributes static metadata , while info can changed @ run-time, changes have no applicability after application has started. what other alternatives have? update my objective: trying do i using traceattribute trace method entry , exit points. switch on or off attribute @ assembly level based on value config file. i'd have off times turn on in emergency situations collect evidence of problem environment. i think more answered here: can attributes added dynamically in c#? i'm still not sure why need bind assembly level attribute , config key, can pass config key attribute's constructor/property , resolve value within attribute logic. like: [attributeusage(attributetargets.assembly)] public class traceattribute : attribute { public traceattribute(string traceconfigkey) { var keyvalue = con...

C++ strings, the string cant contain the plus sign -

C++ strings, the string cant contain the plus sign - i trying create more advanced calculator come in piece of algebra. have problem, string contains inputted doesn't test positive '+' when does. this code tests string for(int = 0; < line.length(); i++) { if(pos == 0 && line[i] >= '0' && line[i] <= '9' || line[i] == '.') { p1[p1p] = line[i]; // setting number current character p1p++; // position of first number } if(line[i] == '+') { pos++; operation = 1; cout << "add" << endl; } } it never out set + unless there no space between lastly character of number , + symbol e.g. '100+10' test positive '+' '100 + 10' wouldn't. thanks -hugh if guess right input info std::cin . why not read characters after first white space. use getline() function instead. c++ string

browser automation - Popup textbox on website on touchscreen monitor -

browser automation - Popup textbox on website on touchscreen monitor - i want textbox popup whenever utilize touchscreen monitor click on textbox on specific website. prefer not interfere code of website. there way can this? maybe writing plugin browser. found google chrome extension, virtual keyboard interface browser-automation

c# - How to intercept any WCF/Ria Service call on client? -

c# - How to intercept any WCF/Ria Service call on client? - i want intercept calls ria service in silverlight, can show loader. possible through wcf api or have write own solution? you can create partial class of context class , in oncreated partial method add together client side behavior iclientmessageinspector provides beforesendrequest , afterreceivereply methods. refer this question or blog post. c# .net wcf silverlight wcf-ria-services

git - GUI public ssh key generator -

git - GUI public ssh key generator - is there gui tool non tech-savvy users not willing utilize cli allowing them generate public rsa key? (except putty method) this mutual case when 1 of project members needs access repo (e.g. via tortoisegit, but's hard forcefulness them generate key give them access). there called rebex it's identical puttygen git user-interface ssh-keys

php - Google Playstore send data to Web Server -

php - Google Playstore send data to Web Server - we have app checks version using our web server, if our android application not match current web server version alert user update google playstore. problem every-time alter application version need alter server version , if first upload server version no 1 can play because application not yet available on google playstore. question possible if google send info our server if our new version has been uploaded available on market because if upload application on playstore needs more time publish before releasing market. there's no way notified when update available. furthermore, it's not all-or-nothing question - updates become available @ different times in different geographic regions well. in essence, updates app don't have transactional integrity. php android

iis - Web Farm Framework fails to mirror to Secondary server -

iis - Web Farm Framework fails to mirror to Secondary server - i've been dealing trying web farm framework working correctly awhile , it's not working. if can't find solution i'm going have @ product or dual deploys out of our build server. the setup have controller setup. i've added servers in every way possible, either setting servers or trying wff , nil working. here's working: controller - wff installed , working primary server - iis management services installed. secondary server - iis management services installed. the 2 servers on netscaler load balancer, have other servers on microsoft nlb , behavior same. the setup went this: added new server farm wff added primary server (running operation addserver) everything looks (web farm agent pushed out primary server, server started in logs) provisioned wdeploy_v2 (web deploy 2.1) through wff force out primary server. got warning downloading microsoft.web.platforminstaller expected, wasn...

ruby on rails - Assigning a class in a .erb clause, "syntax error, unexpected tASSOC, expecting tCOLON2" -

ruby on rails - Assigning a class in a .erb clause, "syntax error, unexpected tASSOC, expecting tCOLON2" - all, i'm getting next syntax error when trying assign class in erb file: syntaxerror in posts#index showing [..]/app/views/posts/_post.html.erb line #5 raised: [..]/app/views/posts/_post.html.erb:5: syntax error, unexpected tassoc, expecting tcolon2 or '[' or '.' ...append= ( post.title, :class => 'my-custom-class' );@output_... ... ^ 3: <td> 4: <div> 5: <%= post.title, :class => 'my-custom-class' %> 6: </div> 7: </td> i add together class <div> - namely <div class='my-custom-class'> .. </div> , there not more elegant way, without div, embedding class assignment in erb clause? ideas here? <%= content_tag, :div, post.title, :class => 'my-custom-class' %> http://api.rubyonrails.org/class...

javascript - Consume a json object , which is basically a list of objects of a class defined in my WCF , in an HTML Win 8 app -

javascript - Consume a json object , which is basically a list of objects of a class defined in my WCF , in an HTML Win 8 app - so have wcf service returns list of objects of class , has been defined in wcf's contract , supposed receive json object in javascript win 8 app. when winjs.xhr({ url: url_final }).then(function (r) { var result = json.parse(r.responsetext); document.getelementbyid("greetingoutput").innertext = result; } i can see [object object] in div , thought how see individual elements on there ? my class : public class graphdata { string concerneddate = string.empty; int32 houroftheday = 0; int32 countathour = 0; } this line: var result = json.parse(r.responsetext); makes result javascript object. u can individual properties of object that: result.concerneddate; result.houroftheday; result.countathour; i suggest log actual result , see construction of object. update: after...

webgl - Three.js, custom light geometry -

webgl - Three.js, custom light geometry - is possible create in three.js lite source has custom geometry, e.g. symbol. there arealight in three.js works rectangular source of lite , has wigth , height parameters. finally, aim surface illuminated such source, visually custom figure. thank westlangley, great example, tried way, unfortunately, didn't work me. tried this: var texttexture = new three.texture( "textures/text.jpg" ); //var texttexture = three.imageutils.loadtexture("textures/text.jpg"); texttexture.format = three.rgbformat; texttexture.wraps = texttexture.wrapt = three.mirroredrepeatwrapping; texttexture.anisotropy = 4; var textlight = new three.arealight( 0xffffff, 3 ); textlight.position.set( 10, 5, -5 ); textlight.rotation.x = math.pi / 2; textlight.width = 30; textlight.height = 10; textlight.texture = texttexture; scene.add(textlight) areali...

fortran90 - Reading a text file as a input and then writing text files with the data in 2D matrices as output -

fortran90 - Reading a text file as a input and then writing text files with the data in 2D matrices as output - i real novice in fortran90, of course of study in other programming language. however, need create programme work. asking comment anybody. in advance. from on, explain problem. original info next as; 15 1r 2 1r 70 22r 2 2r 15 1r 2 1r 8 8r 15 1 3r this written 1 time again in way below; 15 15 2 2 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 70 2 2 2 15 15 2 2 8 8 8 8 8 8 8 8 8 15 1 1 1 1 so total number of info elements in above illustration can counted 48. total number of original info 12,113,640 . , original info made of 220(z) slices of 322(x) x 171(y) . each slices has 55,062 of elements. if possible, way of count of element number, programme count 55,062 elements , create output file(txt) , totally 220 slices of info should 2d array. so have extract 220 slices 1 whole info file. , info should 2d array in ...

linux - Unable To Add Package To Buidroot -

linux - Unable To Add Package To Buidroot - i'm trying add together bundle buildroot, i'm not having much success. bundle i'm trying add together autotools bundle called scew . i've followed buildroot guidelines adding packages, , although bundle listed when make menuconfig run, when run create bundle missing final rootfs.tar . i've copied on simple .mk file that's used install which , , changed variable names , url accordingly. here re-create of scew.mk : scew_version = 1.1.3 scew_site = http://savannah.nongnu.org/download/scew/ scew_license = gplv3 scew_license_files = copying $(eval $(autotools-package)) in same directory have config.in , looks like: config br2_package_scew bool "scew" help google scew i've added next lines package/config.in : menu "my packages" menu "packages wrote" source "package/mypackages/packagesiwrote/hello/config.in" source "package/my...

css - Change Sublime Text Bracket/Indent Rules -

css - Change Sublime Text Bracket/Indent Rules - i'm trying figure out how alter sublime texts auto bracket rules css. i default: .class { #cursor } i have this: .class { #cursor} any ideas on how accomplish this? you can add together shortcut key bindings - user : { "keys": ["enter"], "command": "insert", "args": {"characters": "\n\t"}, "context": [ { "key": "setting.auto_indent", "operator": "equal", "operand": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "\\{$", "match_all": true }, { "key": "following_text", ...

python - NLTK Concordance between delimiters -

python - NLTK Concordance between delimiters - i using python , nltk analyse 'goal' titles. basically, people set goals such 'work harder', 'watch sun rise' , on. want see how , each of non-stopwords appear in list of entries , dump results file. know can give 'concordance' width, , helps little (helps me prune unimportant info out of output). ideally want show concordances comma comma (one 'goal' entry separated commas). know maybe utilize search rather nltk, nltk bundle much more elegant , utilize it, if possible. python nltk custom-formatting

cordova - PhoneGap setKeepCallback - What does it? -

cordova - PhoneGap setKeepCallback - What does it? - i made project, established successfull communication bluetooth plugin javascript. javascript register callback plugin way in java: if (action.equals(action_register_callback)) { if(mjscallback != null) { pluginresult = new pluginresult(pluginresult.status.error, "an event callback has been registered."); } else { mjscallback = callbackid; pluginresult = new pluginresult(pluginresult.status.no_result); pluginresult.setkeepcallback(true); } } this of course of study done in exec function. because of fact, bluetooth events come not @ points of time, registered broadcast receiver, sends messages javascript, when theres found device example. if(bluetoothadapter.action_discovery_finished.equals(action)) { sendmessagetojscallback(new pluginresult(pluginresult.status.ok, "discovery finished.")...

php - setting up ACL permissions from shell or code? CAKEPHP -

php - setting up ACL permissions from shell or code? CAKEPHP - i'm new cake , i'm trying implement simple acl controlled application tutorial cakephp. i have reached setting permissions part, i'm not sure how meant implement permissions, have 3 groups (admin, responder , volunteer). i noticed on video's , other tutorials people using controller implement access command lists, think meant cake 1.3. if help me know how supposed implement acl (shell or controller) , show me example's great. thanks the acl shell allow handle acl related, although requires familiarization acl in general before hang of it. personally, prefer embed acl administration within applications using acl plugin. way can handled web-based within app people in administrators aro (or more if you'd like). i have been using alaxos acl plugin in of projects , works charm. documentation on how set on site well. php cakephp acl cakephp-2.3

mysql - PHP session variables blank after page refresh -

mysql - PHP session variables blank after page refresh - i wrote post before , got responses corrected error had, thought fixed problem. unfortunately didn't, , old post messy plenty i'm going repost problem, added perspective have gained struggling while. code (simplified): <?php session_start(); if (!$_session["companyid"]) { header("location: http://www.somepage.com"); } mysql_connect("localhost", "name", "password") or die(mysql_error()); mysql_select_db("database") or die(mysql_error()); $companyid = $_session["companyid"]; $_session["youtubeurl"] = mysql_real_escape_string($_post["youtubeurl"]); $_session["logourl"] = mysql_real_escape_string($_post["logourl"]); $_session["plan1head"] = mysql_real_escape_string($_post["plan1head"]); $_session["plan1description"] = mysql_real_escape_string($_post["plan1descr...

Command line arguments and argc -

Command line arguments and argc - i looking @ executing programme command line arguments. see argument count (argc) implicit , computer calculates looking @ number of arguments give. i wondered out of curiousity whether or not possible or me explicitly declare value of argc? no, argc passed main() method. supplied @ runtime. command-line-arguments

c# - Get distinct parameters from a List -

c# - Get distinct parameters from a List - this question has reply here: linq distinct() name populate dropdown list name , value 7 answers linq: distinct values 6 answers get distinct items list 3 answers i have cardata object next properties: primarykey make model year drivetrain country i have 1000 of these cardata objects in list : list<cardata> carobjects is there simple way list of distinct make s? var makes = carobjects.select(car => car.make).distinct(); this transforms list list of cardata list of make s, , finds distinct values of new list. c# list

Reversing an ordered list that is created by JQuery -

Reversing an ordered list that is created by JQuery - i have jquery script creating ordered list image slider's navigation , i'm trying float these numbers right. when this, numbers in reverse order , seek might, can't seem them original order. i've tried using 'reverse' attribute, doesn't seem anything. unfortunately can't utilize margin either because force images across well. is there way reverse these damn numbers!? i'm using tpi's alteration of easy slider 1.7: [http://www.thoughtprocessinteractive.com/blog/combining-navigation-on-the-easyslider-jquery-plugin][1]. html: <div id="content-slider"> <div id="content"> <div id="slider"> <ul> <li><img src="../images/events_2/events2_1.jpg" /></br></br><p>caption</p></li> <li><img src="../images/events_2/e...

1 second of delay of css on html page load? -

1 second of delay of css on html page load? - i have been trying create html , css pages. every time when load page. give me half sec flash of html page without css style. know why happens , how prepare it? in advance. solved: guys, place jquery @ bottom , prepare problem. i suggest next :- remove jquery header , place bottom of page . remove excess white space coding. reduce size of images files. try combine many scripts 1 if possible. remove unnecessary elements . combine style sheets 1 - lesser files , lesser response time , faster loading time. optimize background image or image using on page faster loading. in end utilize gzip minify js , css , html . never utilize on images,videos,pdf's - wont additional compression ,but might increment size . html css

html - Which CSS definition is stopping the left sidebar DIV from growing in height? -

html - Which CSS definition is stopping the left sidebar DIV from growing in height? - i having problem determining css class definition stopping left sidebar (the 1 pinkish background) growing in height on this page. i should have mentioned have tried can think of , researched many questions on here, including adding height:auto; , overflow:auto; col-left , sidebar , col-main , others already. can help me identify it? at glance, think main problem utilize of position:absolute .col-left . position:absolute causes element outside of flow of rest of page. height of has no effect on resulting height of parent (as if not within parent). html css

c# - How to connect and test a Windows CE project on a real device? -

c# - How to connect and test a Windows CE project on a real device? - note : i'm using vs2008 , i'm working on windows 7. i'm developping windows ce application run on motorola mc3000 device wince 5.0 os . i tried utilize activesync in order create test selected device possible doesn't work on win7, tried find tool , found windows mobile device center based on this discussion . so can browse device unfortunately can not test : device have "santech" application installed , can not kill app. (even when reboot machine, autorun lunch app. automatically). when seek deploy application on device homecoming error reports ; "no disc space" "the .exe can not found". i'm stucked. can 1 help me this, gratefull. sounds debugger attaching fine, it's unable either re-create app , dependencies, or there's not plenty memory execute it. if can browse device, can stop "santech" app running. have determine l...

ios - how to reschedule a repeatinterval notifications after letting the user to disable it temporarily? -

ios - how to reschedule a repeatinterval notifications after letting the user to disable it temporarily? - what's best approach implement "do not disturb mode" our apps? letting user take disable notification between 2 periods. should utilize cancel method? [[uiapplication sharedapplication] cancelalllocalnotifications]; any thoughts on specific component used appreciated. thank you you can utilize bool instance turn yes when user sets "do not disturb" , no when disable setting. therefore, before posting notifications, can command if "do not disturb" on or off using bool instance. hence able alter behaviour of whole app. if want specify period, utilize timer trigger method in can set bool no , post notification should posted while "do not disturb" on. ios objective-c xcode notifications uilocalnotification

jax ws customization - Asynchronous webservice in cxf -

jax ws customization - Asynchronous webservice in cxf - i need send response unsolicitedly server side client side using cxf.i much comfortable in making synchronous jax-ws calls client server(i used sopaui invoke server webservice_..i next jax-ws wsdl first approach.i using cxf 'wsdltojava' convert wsdl java classes. to create simple,my question 'how send response(without request client) server client in cxf,jax-ws wsdl first approach? cxf jax-ws-customization contract-first

java - convert extremely large decimal to bytes -

java - convert extremely large decimal to bytes - how convert extremely big (>1mb) decimal numbers bytes/hex/binary? for example, number "300" should converted {0x01, 0x2c}. byte order doesn't matter , {0x2c, 0x01} ok. the source numbers stored in prepped file (without puntuation, whitespace or linebreaks). largest just on 17mb, although can't rule out i'll have 100mb number in future. destination file. is there way doesn't take ages, or fail-safe in case does take ages? i fear using biginteger take ages , not fail-save (ie. can't resume half-way if goes wrong) i'm not against implementing own algorithm, although i'm looking more efficient 'check if odd, split 2'. i've seen efficient implementation of binary bcd, shift , add-3 algorithm, , looking efficient implementation in reverse. an kudos implementation supports fixed-point numbers (with 1 digit , rest decimals, eg. pi). for me biginteger converts 1m d...

nlp - Are there any off-the-shelf solutions for lexical analysis in Haskell that allow for a run-time dynamic lexicon? -

nlp - Are there any off-the-shelf solutions for lexical analysis in Haskell that allow for a run-time dynamic lexicon? - i'm working on little haskell project needs able lex little subset of strictly formed english language in tokens semantic parsing. it's naïve natural language interface scheme many different end effectors can issued commands. i'm using alex this, alex relies on lexicon statically compiled. nature of scheme such number , type of end effectors in world can increment decrease after compilation, , need able add together or remove viable tokens lexicon @ runtime. i've tried looking around dynamic lexing solutions, , closest this dynamic lexer engine doesn't have been updated since 2000. i've been considering techniques using less-high level approach (attoparsec, perhaps), or wiring recompilation hook alex , separating lexer rest of application. are there well-known solutions sort of lexical analysis? intend on working through...

c# - check if the first element of a string is positive integer -

c# - check if the first element of a string is positive integer - i need check if first element of string positive integer in c#. there smart way this? fx string str = "2001"; if (str.first() == isanumber) { ... } you can seek this: string s = "1sdfa"; bool isdigit = char.isdigit(s[0]); also, if wanted additional checks on string, them this: bool isdigit = !string.isnullorempty(s) && char.isdigit(s[0]); c# string parsing

php - htaccess different path for errordocument on localhost -

php - htaccess different path for errordocument on localhost - i facing problem while editing .htaccess file custom error page. while on live server, works fine. errordocument 400 /error.php?e=400 errordocument 401 /error.php?e=401 errordocument 403 /error.php?e=403 errordocument 404 /error.php?e=404 errordocument 500 /error.php?e=500 but on localhost (wamp) site located in folder named sms under www directory. i've modify code errordocument 400 /sms/error.php?e=400 errordocument 401 /sms/error.php?e=401 ....and on files is there simple way handle situation dont have edit these line every time... thanks.. it may little bit late in day, had similar problem , solved it. it's documentroot setting (in apache configuration) culprit. has point folder site resides both on local , remote machines. apparently in case not. you kind of error if (for example) site resided in sms directory both on local , remote machines, , in both cases directory resided in d...

ios6 - Manage memory allocation issue on Map iOS -

ios6 - Manage memory allocation issue on Map iOS - in iphone app have map view. in displaying number of pin views depends on info web server. here method used it. - (mkannotationview *)mapview:(mkmapview *)mapview viewforannotation:(id <mkannotation>)annotation { nsstring *identifier = @"mypin"; self.pinview = (mkpinannotationview *)[self.mapview dequeuereusableannotationviewwithidentifier:identifier]; if (self.pinview == nil) { self.pinview= [[[mkpinannotationview alloc] initwithannotation:annotation reuseidentifier:identifier]autorelease]; //11.1% } else { self.pinview.annotation = annotation; } uibutton* rightbutton = [uibutton buttonwithtype:uibuttontypedetaildisclosure]; //20.4% [rightbutton settitle:annotation.title forstate:uicontrolstatenormal]; self.pinview.rightcalloutaccessoryview = rightbutton; //2.7% myannotation *annot = (myannotation*)annotation; uiimageview *egoimageview = [[uiima...

Authentication fails in Zend for account confirmation -

Authentication fails in Zend for account confirmation - i stuck problem. when login credentials authenticated in zend application , want check if business relationship has been confirmed or not. confirmed boolean column in business relationship table , set false default. trying accomplish through next code..but not working $db = zend_db_table::getdefaultadapter(); $authadapter = new zend_auth_adapter_dbtable($db); $authadapter->settablename('account'); $authadapter->setidentitycolumn('email'); $authadapter->setcredentialcolumn('password'); $authadapter->setcredentialtreatment('confirmed = 1'); $authadapter->setidentity($data['email']); $authadapter->setcredential($data['password']); $auth = zend_auth::getinstance(); $result = $auth->authenticate($authadapter); if ($result->isvalid()) { if ($data['public'] == "1") { zend_s...

extjs - Compiled Produced Syntax Error in Sencha Touch command line -

extjs - Compiled Produced Syntax Error in Sencha Touch command line - i using sencha touch 2.0.1 need build app using sencha command, when using running comans sencha app build production i receive error. it seems me connected magnification project. could tell me doing wrong here. thanks [info] deploying application /applications/mamp/htdocs/vladimir-xxx/build/production [info] copied sdk/sencha-touch-all.js [info] copied app.js [info] copied resources/images [info] copied resources/icons [info] copied resources/startup [info] resolving application dependencies (file:////applications/mamp/htdocs/vladimir-xxx/index.html) [info] found 31 dependencies. concatenating '/applications/mamp/htdocs/vladimir-xxx/build/production/app.js' [info] processed sdk/sencha-touch-all.js [info] minifying sdk/sencha-touch-all.js [info] processed app.js [info] minifying app.js [error] error: command failed: [error] 2005:25:identifier reserved word [error] 2008:45:missing ; before sta...

c# - Getting error Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com" -

c# - Getting error Please provide valid credentials. OAuth oauth_problem="OST_OAUTH_PARAMETER_ABSENT_ERROR", realm="yahooapis.com" - i working on " http://developer.yahoo.com/yql/console/ " site. http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20social.profile%20where%20guid='zgvg52zdaygczrff4vba5l6icy' when come in executed string in address bar please provide valid credentials. oauth oauth_problem="ost_oauth_parameter_absent_error", realm="yahooapis.com" cooured think authentication error occure . couldnot understand set authentication parameter api ? in url ? how ? please help illustration code. i think need add together authorization header requesting uri header. thing this string headerstring = "authorization: oauth realm=your oauth realm&" + "oauth_timestamp= xxxxxxxx&oauth_nonce=your value&,"+ ...

java types which is not type primitive -

java types which is not type primitive - i'm familiar java primitive types described in next link http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html question type next types related bigdecimal , java.util.date string .... where can found doc describe type not primitive , not related list hashmap etc talking types can defined class members. you can find info in java api. example, bigdecimal : http://docs.oracle.com/javase/6/docs/api/java/math/bigdecimal.html any type can defined type of class member. java types type-conversion

c# - Checking collisions 2D array connect 4 -

c# - Checking collisions 2D array connect 4 - i'm trying create 2d connect 4 game in c#. know when 4 colors have match. anyway i'm trying collisions work maintain getting error saying "index outside bounds of array" know why is? thanks private void rules() { int count = 0; if (btn[maxr, maxc].backcolor == color.red) { count = 1; } (int = 0; <= btn.length; i++) { if (btn[maxr, i].backcolor == color.red) { count++; } } if (count >= 4) { lbl2.text = "winner"; } you used: i <= btn.length and causes out of range exception, because index starts 0 , ends in btn.length-1 . so utilize : for (int = 0; < btn.length; i++) p.s: don't know if there logical error. c# arrays 2d collisions

ruby - Error working with Typhoreus and SeoMoz API -

ruby - Error working with Typhoreus and SeoMoz API - i working seomoz api using typhoreus gem. authenticate(signed authentication) api, utilize next code: url = "http://lsapi.seomoz.com/linkscape/url-metrics/"+website.url.strip+"?cols=103079231520" response = typhoeus::request.get(url, :username => "member-xxxxxxx", :password => "abcxyzwhatever") error: ethon::errors::invalidoption: option: username invalid. please seek userpwd instead of username. if alter username userpwd, asks alter password userpwd well. where going wrong? the api changed bit, should work: typhoeus::request.get(url, :userpwd => "member-xxxxxxx:abcxyzwhatever") ruby ruby-on-rails-3 typhoeus

low level - C, write system call, writing int -

low level - C, write system call, writing int - i found source in jon erickson's book, hacking: fine art of exploitation, userid = getuid(); // real user id // writing info if(write(fd, &userid, 4) == -1) // write user id before note info fatal("in main() while writing userid file"); write(fd, "\n", 1); // terminate line i tried compile code, , found on file write, userid (which write in code above) not right; wrote unusual character (i think not of import write here). problem trying pass int function required char * , because of result on file want write false. so bug, right? the write() function expects void * buffer; writes arbitrary binary data. if need conversion string, utilize printf() . you don't show declaration of userid , write() line should written as: if (write(fd, &userid, sizeof(userid)) != sizeof(userid)) this observe short writes (unlikely problem integer type) , other problems, , works ...

php - Changing the browsers URL address on an event -

php - Changing the browsers URL address on an event - this question has reply here: good tutorial using html5 history api (pushstate?) [closed] 9 answers i saw on facebook. when click on shared photo in facebook, shows photo on full-screen. then, if @ url of browser changed. page did not refresh. so, how can such task on own ? how can alter browsers url, after ajax (or other...) event ? you're looking html5 history api. php ajax facebook

ruby on rails - Join tables and foreign keys -

ruby on rails - Join tables and foreign keys - i'm getting rather confused foreign keys in bring together table. i'm trying build bring together table links user , guideline models form favoriteguideline table (i.e. user can pick favorite guideline). my error is: 'expected favoriteguideline have belongs_to association called favorite (favoriteguideline not have favorite_id foreign key)' my favorite_guideline.rb is class favoriteguideline < activerecord::base belongs_to :user belongs_to :guideline belongs_to :favorite, class_name: 'user', foreign_key: 'favorite_id' attr_accessible :user, :favorite, :guideline end and favorite_guideline_test.rb is require 'test_helper' class favoriteguidelinetest < activesupport::testcase should belong_to(:user) should belong_to(:favorite) test "that creating favorite works without raising exception" assert_nothing_raised favoriteguideline.create user: ...

lua - Globals are bad, does this increase performance in any way? -

lua - Globals are bad, does this increase performance in any way? - i'm working in luajit , have libraries , whatnot stored within "foo", this: foo = {}; -- global variable foo.print = {}; foo.print.say = function(msg) print(msg) end; foo.print.say("test") now wondering, using metatables , keeping libraries local help @ all? or not matter. thought of this: foo = {}; local libraries = {}; setmetatable(foo, { __index = function(t, key) homecoming libraries[key]; end }); -- function create new library. function foo.newlibrary(name) libraries[name] = {}; homecoming libraries[name]; end; local printlib = foo.newlibrary("print"); printlib.say = function(msg) print(msg) end; -- other file: foo.print.say("test") i don't have tools benchmark right now, keeping actual contents of libraries in local table increment performance @ all? slightest? i hope made mysef clear on this, want know is: perfor...

html - How to inject type attribute into all script tags via javascript -

html - How to inject type attribute into all script tags via javascript - i want know how query script tags , set random attribute. have tried not work: document.getelementsbytagname("script")[0].setattribute("data-foo", "bar"); it matches first script tag. (no jquery please. love it, not now. needs cross-browser queryselectorall won't work). edit: okay, turns out, pure-javascript query selectors select things they're loaded (as kolink pointed out , thesystem explained). have add together script set's attributes after other script tags. one possibility have other scripts written dynamically page using document.write . this classic case document.write useful. // in main/powerhouse // list of script sources var scripts = ["script1.js", "script2.js", "script3.js"] (var = 0; < scripts.length; i++) document.write('<scr', 'ipt type="text/javascript" src=...

php - Output on same form in Javascript -

php - Output on same form in Javascript - this question exact duplicate of: option field in html php 1 reply i want search employee list depend on area name selected dropdown list. can retrieve names of areas database dropdown list php html. confused how pass selected alternative in dropdown list sql query in php. want index numbers of selected options. code follows. <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title></title> </head> <body> <?php include 'connect.php'; $query = "select varareaname tbarea" ; $result = mysql_query($query); echo'<select name="somename">'; echo'<option value="any">--any--</option>'; while($row = mysql_fetch_assoc( $result )) { echo '<option value="...

c# - How can I call a generic method on an injected class without informing the parent class of the generic type? -

c# - How can I call a generic method on an injected class without informing the parent class of the generic type? - below implementation of dependency injected class. public class csvdataprovider : icsvdataprovider { readonly icsvreaderfactory _factory; public csvdataprovider(icsvreaderfactory factory) { _factory = factory; } public ienumerable<trecord> getdata<trecord>(string filepath) trecord : class { var reader = _factory.createcsvreader(filepath); homecoming reader.getrecords<trecord>(); } } the reader created factory read lines in csv file , convert each line instance of trecord . not own reader code , can not alter getrecords<trecord>() method. this stuck: public class csvdatamigrationcontroller { readonly icsvdataprovider _provider; readonly icsvdatamigration _migration; public csvdatamigrationcontroller(icsvdataprovider provider, icsvdatamigration migration) { ...

IDE for mongodb for Ubuntu -

IDE for mongodb for Ubuntu - this question has reply here: how can browse or query live mongodb data? 20 answers previously using mongodb help of mobgovue on windows 7, switched windows 7 ubuntu , facing problem work efficiently on mongodb commands. can help me suggest ide mongodb in ubuntu. thanks take @ here: http://www.mongodb.org/display/docs/admin+uis personally, think umongo (formerly jmongobrowser) seems best alternative linux. mongodb ubuntu ide

ios - How to make to keyboard has behavior like in default apps when text field is inside scroll view? -

ios - How to make to keyboard has behavior like in default apps when text field is inside scroll view? - i have created in storyboard simple app (only 1 controller), set scrollview , within scrollview couple uitextfileds. within controller have added function like - (void)touchesbegan:(nsset *)touches withevent:(uievent *)event { [self.name resignfirstresponder]; [self.number resignfirstresponder]; // have tried , without line doesn't work [self.scrollview resignfirstresponder]; } (name, number outlets of uitextfield, scrollview outlet of uiscrollview). when click on of text fields keyboard pops when finish typing cannot hide keyboard. (in previous version didn't have scrollview , keyboard hides when click out text field). how create keyboard has behavior in default apps, how hide ? in view controller: [self.view endediting:yes]; this dismiss keyboard no matter field first responder. think there exceptions, you're doing should wo...

module - Static import in JavaScript -

module - Static import in JavaScript - if have module public fellow member , utilize this module.sub.member() then best (if exists) way static import fellow member local scope, using in cpp or import static in java? var app = (function(app) { /* dependencies */ var sound = app.modules.sound, input = app.modules.io.input, ... /* actual code using dependecies */ ... })(app || {}); this solution has several advantages: stated @ top of module, it's visible @ first glimpse (maintainable code) , usual benefits of imports: less typing, avoidance of namespace clashes etc. (maintainable code) long property path look-ups ( a.b.c.d ) needed 1 time (performance) , using local variable faster, using global variable - quicker look-ups (performance), minification tools can minify local variable names safely, can't trivially minify global variables. javascript module

CRUD with Python ... IndexError: tuple index out of range -

CRUD with Python ... IndexError: tuple index out of range - i have couple of selects , update using python. totally new @ language, , having bit of problem syntax when doing next (simple) queries: select a.customer_name, a.customer_city, b.population contracts bring together cities b on a.customer_city = b.ident b.population <=500000 select a.ident, a.make, a.model, a.luxury, b.car_ident cars bring together contracts b on a.ident = b.car_ident luxury = 'y' update contracts set base_price=1000 contract_class >=10 i starting update...i figured shorter code.... when update statement, next error: >'update {} set base_price = ? {}'.format(self._table), (row['base_price'], >row['where'])) >indexerror: tuple index out of range here's have methods def retrieve(self, key): cursor = self._db.execute('select {}'.format(self._table)) homecoming dict(cursor.fetchone()) def update(se...

c# - Keeping the item named 'other' at the bottom of my ordered list -

c# - Keeping the item named 'other' at the bottom of my ordered list - i have list of selectlistitems this: list<selectlistitem> test = new list<selectlistitem> { new selectlistitem { text="aaa", value ="1"}, new selectlistitem { text="ttt", value="2"}, new selectlistitem { text="bbb", value = "3"}, new selectlistitem { text="other", value = "4"} }.orderby(x => x.text).tolist(); this above code homecoming ordered list this: aaa bbb other ttt i order list maintain item named 'other' @ bottom of list. how possible? maybe work list<selectlistitem> test = new list<selectlistitem> { new selectlistitem { text="aaa", value ="1"}, new selectlistitem { text="ttt", value="2"}, new selectlistitem { text="bbb", value = "3"}, new ...

asp.net mvc - Facing issue while submitting Partial View using JQuery post -

asp.net mvc - Facing issue while submitting Partial View using JQuery post - i have area below. controller class public class admincontroller : controller { // // get: /admin/admin/ [httppost] public actionresult index_partialpost(adminmodule model) { homecoming partialview("_partialpage1", model); } [httpget] public actionresult index_partial() { homecoming partialview("_partialpage1"); } [httpget] public actionresult index() { adminmodule model = new adminmodule(); model.myname = "my name"; homecoming view("index", model); } } view @model _1.areas.admin.models.adminmodule @{ viewbag.title = "index"; layout = "~/areas/admin/views/shared/_layoutpage1.cshtml"; } <h2> index</h2> <div id="myform"> <p id="pid"> </p> </div> <input id=...

How to configure mysql with asp.net Entity Framework? -

How to configure mysql with asp.net Entity Framework? - i trying connect mysql database entity framework vs2010-12(web developer). i have downloaded , installed mysqlconnector(mysql-connector-net-6.6.5.msi) connect entity framework. after installation have created new website,added entity info model , tried configure in entity info model wizard not able see info source of mysql configure database. anybody have thought on this. please help me. download : http://cl.ly/jqxo kindly refer reply : mysql datasource on visual studio 2012 asp.net mysql entity-framework

Java concurrency support using java.util.concurrent semantics -

Java concurrency support using java.util.concurrent semantics - i'm trying back upwards modification (deactivate() function call) of next info construction in thread safe manner - private static map<string, set<integer>> dbpartitionstatus = new hashmap<string, set<dbpartitionid>>(); public void deactivate(dbpartitionid partition) throws exception { synchronized (dbpartitionstatus) { set<dbpartitionid> partitions = dbpartitionstatus.get(servicename); if (partitions == null) { partitions = new hashset<dbpartitionid>(); } partitions.add(partition); dbpartitionstatus.put(servicename, partitions); } } if replace synchronization concurrenthashmap & concurrentskiplistset duo, there race condition. i wondering if there cleaner way of achieving synchronization here (using java.util.concurrent) should no race conditions next implementation: private final static...

How to remove certain strings in a non-existing URL and redirect it to another URL using .htaccess in Joomla -

How to remove certain strings in a non-existing URL and redirect it to another URL using .htaccess in Joomla - this first question here in stackoverflow. website helped me lot in terms of web development using drupal, joomla, wordpress, javascript, html, jquery , lot more in world of web development. , many thanks! i've searched site related title of question honestly, none of them answers straight question. struggling days trying work 1 out never got right solution. so here problem. i've been trying redirect these non-existing url's in joomla site using .htaccess couldn't create right. can of suggest how should done in .htaccess ? www.mysite.com/index.php/component/content/37-2009-10-15-19-28-33?format=feed&type=rss should redirect www.mysite.com/index.php/component/content www.mysite.com/index.php/paving-horizontal-concrete/park/34?format=feed&type=atom should redirect to www.mysite.com/index.php/paving-horizontal-conc...