Posts

Showing posts from May, 2015

apache spark - Parse complex XML file to get object and its fields -

is there way parse complex xml file child element object fields/members accessible in 1 read? i'm working on code passed me uses dom4j , developer did read each node. object fields , members, read file 4 or 5 times each one. build object have make these calls? takes 15 secs run. maybe dom4j can more 1 element in 1 read of file? is jaxb more that, giving reference object , fields in 1 read? is spark or hadoop better/faster performance wise? you see i'm looking read xml file , extract element child elements, etc build objects in 1 read. let me know work best! since dom4j reads entire file , builds object graph in memory, there shouldn't need "read" file more once. on other hand, if have schema type of document processing, jaxb better alternative.

asp.net mvc - using the same partial view with different buttons -

i have following partial view, lists users in table. each row has enroll button, enrolls user selected course. i need same view task. however, need add users discussions (instead of enrolling them course). know can create view , change enroll buttons add buttons. however, wonder if there more effective way of doing this. approach not seem easy maintain. @model ienumerable<applicationuser> <h4>search results:</h4> <table class="table-condensed" style="font-size:smaller"> @foreach (var item in model) { <tr> <td> @html.displayfor(modelitem => item.firstname) </td> <td> @html.displayfor(modelitem => item.lastname) </td> <td> @html.displayfor(modelitem => item.email) </td> <td> <input class="btn_enroll" data...

python - Write a function substr(stringA,StringB) that returns true if StringA is a subset of StringB,and false otherwise -

actually, can use build in function it, questions requires me use loops, helps? dont have idea using loop solve it. the questions requires me use loops def isin(stringa, stringb): while 7: return stringa in stringb

iphone - Posting message on my wall facebook ios sdk? -

hello trying post message on wall while targeting friend. post on our wall @friendsname .i using code below nsmutabledictionary* params1 = [nsmutabledictionary dictionarywithobjectsandkeys: @"post", @"type", urlqrcode, @"picture", [globals linktoapp], @"link", @"xsxsx", @"name", @"sxsxsxsxsx", @"caption", @"sxsxssx", @"description", messsdsage, @"message", @"friendfbuid", @"to", nil]; [appdelegate.facebook requestwithgraphpath:@"me/feed" andparams:params1 ...

Swift Text Label Nil Even With Default Value -

this driving me crazy. function updatetextview() being called, verified print statements, not setting label in view controller, , print statements label returning nil though has default value set visible when app loaded. whats more perplexing set test button call function separately, , when call test() , label updates properly. class goaldetailviewcontroller: uiviewcontroller, textdelegate { @ibaction func test(sender: anyobject) { updatetextview() } func updatetextview() { print(goalsummarytextbox?.text) print("delegate called") self.goalsummarytextbox?.text = goalsdata.summarytext print(goalsummarytextbox?.text) } @iboutlet weak var goaltitle: uilabel? @iboutlet weak var goalcreationdate: uilabel? @iboutlet weak var goalsummarytextbox: uitextview? override func viewdidload() { super.viewdidload() goalsummarytextbox?.text = goalsdata.summarytext } } updatetextview() bei...

python - glob.iglob to find all .txt files in all sub-directories yields error -

simple code gives below error. it's directly docs ( https://docs.python.org/3/library/glob.html ) typeerror: iglob() got unexpected keyword argument 'recursive' import glob filename in glob.iglob('c:\\**\\*txt', recursive=true): print filename it seems you're using python 2.7 , reading python 3.5 documentation.

rsyslog inside docker containers => "rsyslogd is not running ... failed" -

i running rsyslog within docker containers send udp messages logstash. when log docker container, , type: service rsyslog status shows: rsyslogd not running ... failed! however, while in container, if type: service rsyslog start it starts no errors , no real sign of why failed @ start i can not figure out why failing!!!! *the rsyslog conf file has not been modified except modules allow imfile. rsyslog.conf follows: # /etc/rsyslog.conf configuration file rsyslog. # # more information see # /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html ################# #### modules #### ################# module(load="imfile" pollinginterval="10") module(load="imuxsock" ) # provides support local system logging module(load="immark") #provides --mark-- message capability ########################### #### global directives #### ########################### # # use traditional timestamp ...

edx - How to test 'studio_view' in xblock-sdk? -

i'm developing custom-xblock , course-creator can add html in predefined , pre-designed block. have installed xblock-sdk , using same xblock development. can test student_view in xblock-sdk want test studio_view in same environment. right in forward test studio_view, have install developed custom-xblock in edx-platform. if there way test in xblock-sdk development can faster , reliable. i have dogwood release installed in edx-devstack . depends on mean "test". if that's manual testing - possible, easier install locally , check if works in actual studio. access views other student_view , open scenario xblock, add /${view_name} url - should open view (i.e. localhost:8080/scenario/test/student_view`) if you're talking unittests - read along. there's xblock-utils repository provides quite useful base classes. 1 of classes, seleniumbasetest might give insights on how ( these lines in particular ). or can subclass test class , use (exampl...

In java, is there a way to generate a valid dictionary word of certain length randomly? -

i need generate valid dictionary word of length in random fashion. there api or code snippet this? tried googling couldn't find this. thanks you can download .csv file has around 200 thousand english words. can parse .csv file, add entries arraylist . create function randomly generates number between available indices of arraylist , use entry @ random index . or, can think of alike yourself.

intervals - JavaScript Resource while in a loop -

i have small script... var foo = function (){ ... stuff here ... settimeout(foo, 1); } foo(); so asking foo call once it's finished giving 1 millisecond break, so run forever until browser refresh etc... question: i want avoid overwhelming browsers or causing crashes bad idea, or there need consider avoid crashes? the idea runs through , wait's happen it. i'd have long , short of it. that's basic pattern, though may want make execute @ least once first. ;-) (function(){ var foo = function(){ settimeout(foo, 1e3); }(); })(); though doubt execute every 1ms (and whatever you're doing can't need that often, can it?). if testing form server, @ using long polling. if you're checking change in browser, @ binding specific events , not checking delta.

php - Composer => Wordpress plugin workflow -

the question first know, while reading, problem is: what correct workflow updating plugin within in composer/wordpress project managed git? i've wordpress project following directory structure: root httpdocs wp-content plugins wp-config.php ... composer.json and inside plugins folder: myplugin composer.json the stripped root composer.json looks this: { [...] "require": { "example/myplugin": "dev-master" }, "repositories": [ { "type": "composer", "url": "http://composer.example.com" } ], "extra": { "installer-paths": { "httpdocs/wp-content/plugins/{$name}": [ "example/myplugin" ] } } } and composer.json inside the myplugin folder: { [...] "license": "proprietary", ...

php - Phalcon\Mvc\Model serialization - object properties are lost -

serializing phalcon\mvc\model loses object property that's not part of schema. i have following model, upon load sets array of states: class country extends phalcon\mvc\model { protected $states; public function initialize() { $this->setsource('countries'); } public function afterfetch() { if ($this->id) { $this->states = ['al', 'az', 'nv', 'ny']; } } } i this: $country = country::findfirst($countryid); $serialized = serialize($country); $unserialized = unserialize($serialized); $serialized string not contain "states" substring. hence, "states" missing in unserialized object. i have discovered while working on user authentication , persistence in session (which involved serialization/unserialization). user object losing properties loaded in afterfetch() phase. two questions: why did "states" property disap...

freemarker - untime - Template processing error: "No mapping defined for spring framework tags -

my current development environment java 6, spring framework 3.2, weblogic 10.3.6 , using freemarker templates. working fine in current environment, don't see runtime issues while browsing pages. ide: eclipse kepler 4.3 , running weblogic server eclipse ide. deployment assembly m2e plugin comes kepler. now upgrading latest weblogic 12.1.2 , java 7. able build, deploy , publish module while accessing pages, see runtime issues freemarker templates. there related issue discussed in forum tomcat deployment wherein solution add spring-security-taglibs pom file , place spring-security-taglibs.jar in web-inf/lib folder. not work me. greatly appreciate in resolving issue. see many freemarker template exception related postings not solution. below runtime error, seeing. 2013-09-23 14:16:30,696 [[active] executethread: '0' queue: 'weblogic.kernel.default (self-tuning)'] error freemarker.runtime - template processing error: "no mapping defined http://www....

javamail - How to get HTML text / plain text from java.mail -

when i'm reading email body java.mail in contenttext first plain text , after html text. i.e. if send message <div><b>mock</b><br />mock 2</div> contenttext contains: mock mock <div><b>mock</b><br />mock 2</div> below code load contenttext: public void setcontenttext(multipart multipart) throws messagingexception, ioexception { contenttext =""; (int = 0; < multipart.getcount(); i++) { bodypart bodypart = multipart.getbodypart(i); getbodytostringpart(bodypart); } } protected void getbodytostringpart(bodypart bodypart) throws messagingexception, ioexception { string disposition = bodypart.getdisposition(); if (!stringutils.equalsignorecase(disposition, "attachment")) { if (bodypart.getcontent() instanceof base64decoderstream && bodypart.getheader("content-id") != null) { base64decoderst...

c# - ASP.net suggestions as you type -

i have asp.net website tables (radgrids) connected mssql. users enter data in few tables , assemble other tables using drop down lists values entered earlier. i experiencing double entry in few data tables , considering implement suggestion type show similar entries existing in column of database. so questions may have answer . sort of popup showing entries saved in column similar words. a reference similar or type of controls used these kind features appreciated. not being professional in coding looking starting point. thanks you use ajaxcontroltoolkit it has decent (if not good) auto complete extender control can used display values database. simply download .dll , add websites bin folder , should go. you create quick page method or web service has method matches required signature : public string[] getcompletionlist(string prefixtext, int count) { ... } and can return array of matched values of "prefix text", need use either ado.net code or ...

php - Display only future events (cpt) -

my current code shows 5 posts cpt 'events'. code i'm using: //get post type ==> events global $post; $args = array( 'post_type' => 'events', 'numberposts' => $data['home_events_count'], 'orderby' => 'meta_value', 'meta_key' => 'timestamp_earth_event_start_date', 'meta_query' => $meta_query ); i want filter out posts (events) 'timestamp_earth_event_start_date' older current date. i've tried modify code myself, still past events shown. any appreciated! try 1 passing query string $numposts=$data['home_events_count']; query_posts('post_type=events &post_status=publish&numberposts=$numposts &posts_per_page=1 &meta_key=timestamp_earth_event_start_date &orderby=meta_value_num &order=desc') by passing array $args = array( 'post_status' => 'publ...

.net - Compiling C# unsafe code -

i have small c# class few unsafe methods. there way specify "/unsafe" option declaratively in c# source code (with #pragma or anyhow else) context of class' source file? i'd hate create separate assembly such small class, don't want rest of assembly (the class part of) enabled unsafe code. no, (currently) not possible, entire assembly affected having unsafe code in it. by including unsafe code in assembly, telling clr assembly something, well, unsafe, changes how runtime acts when loads assembly. biggest change here clr not try verify unsafe code, refuse load assembly unless has full-trust (e.g. couldn't load unsafe assembly normal user on click-once.) from technical perspective, when use /unsafe option, causes compiler emit il equivalent of following module-level attributes assembly: [assembly:securitypermission(skipverification = true)] [assembly:unverifiablecode] your best option is, said, isolate unsafe code own separate assembly as ...

iphone - How could I stop UIScrollView from bouncing if there's no scroll distance? -

i have uiscrollview want bounce when scrolls, it's able bounce despite content size being same frame. how can stop bouncing if content size , frame same size? there more elegant way overriding setcontentsize , setframe check it? you can have check that if(scrollview.contentsize==frame.size) { scrollview.bounce = no; } else { scrollview.bounce = yes; }

dom - addClass and removeClass in jQuery - not removing class -

i'm trying simple. have clickable div 'hot spot', when click fills screen , displays content. achieved changing class of div, removing 'spot' , adding 'grown' , there's little css animation make grow. works fine. the problem is, within div there close_button, @ moment text. want switch classes - i.e. remove grown , readd spot. doesn't when clicked. believe it's element not having classes when dom loads, i'm new jquery , don't know how work around this. i think there's more sensible way of doing it, point me in right direction? i'd grateful. i've tried using toggleclass instead no avail. $( document ).ready(function() { $(".clickable").click(function() { $(this).addclass("grown"); $(this).removeclass("spot"); }); $(".close_button").click(function() { alert (this); $("#spot1").removeclass("grown"); ...

javascript - Does this Ajax method work in many browsers and operating systems? -

i'm using ajax in javascript values ​​on other pages. function loadxmldoc(){ var xmlhttp; if (window.xmlhttprequest) {// code ie7+, firefox, chrome, opera, safari xmlhttp=new xmlhttprequest(); } else {// code ie6, ie5 xmlhttp=new activexobject("microsoft.xmlhttp"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readystate==4 && xmlhttp.status==200) { document.getelementbyid("mydiv").innerhtml=xmlhttp.responsetext; } } xmlhttp.open("get","ajax_info.txt",true); xmlhttp.send(); } but i'm afraid not work in browsers or operating systems. safe use? or better use jquery ajax? (detail: not want use jquery!) first off up-vote trying real javascript! secondly unaware you're treating code text, not code. don't use innerhtml , don't use responsetext . need use proper dom method such appendchild , insertbefore though ajax need use importnode , responsexml . xml load se...

android - Animate(ScaleAnimation) LinearLayout when it's height changes due to add/removal of view inside it -

Image
i have linearlayout & have 2 textviews inside it. dynamically want hide 1 textview or can add textviews @ runtime. problem when textview disappears linearlayout collapses in no time. want animate linearlayout(scaleanimation) when views removed linearlayout. activity_main.xml <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".mainactivity" > <linearlayout android:id="@+id/linearlayout1" android:layout_width="match_parent" ...

wpf - Getting weird behaviours when changing the binding to the TreeView -

i have observablecollection fathers contains property observablecollection sons . , i'm displaying on treeview setting datacontext property. sons property displays listbox of radio button under each father - binded itemssource . first time setting datacontext of tree view fathers list, working good. radio buttons checked according data. now, i'm setting treeview.datacontext null - data disappear. , original fathers observablecollection set in first time. and reason radio buttons stopped being synchronized son object. , got deeper , saw setter in son object (that binded radio button) raised false reason. guess related binding. is there cache treeview , or observablecollection saving after binding ? want work first time set bind - there should getter being called should. thanks. this tree view <usercontrol x:class="tester.ctlmytree" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sc...

how to use cmd multiple time when using it with node.js or karma or anythng else on windows -

for example - run node.js script commandline, node server.js after cmd block input , if want more things, need open new cmd window. same karma. if run karma start command, need open new cmd window karma run so question how unblock cmd window able executes new comands just start apps start command: start /b node server.js

amazon web services - AWS S3 Glacier - Programmatically Initiate Restore -

i have been writing web-app using s3 storage , glacier backup. setup lifecycle policy archive it. want write webapp lists archived files, user should able initiate restore , email once restore complete. now trouble running cant find php sdk command can issue initiaterestore. nice if notified sns when restore complete, sns push json onto sqs , poll sqs , email user when polling detected complete restore. any or suggestions nice. thanks. you use aws cli tool (here i'm assuming want restore files in 1 directory) : aws s3 ls s3://mybucket/mydir/ | awk '{if ($4) print $4}' > myfiles.txt x in `cat myfiles.txt` echo "restoring $x" aws s3api restore-object \ --bucket mybucket \ --key "mydir/$x" \ --restore-request '{"days":30}' done regarding desire notification, cli tool report "a client error (restorealreadyinprogress) occurred: object restore in progress" if request initiated...

How to add a Area-City associated select list in Django Admin -

like this: when select state, second list city of state choose. excuse writing. native language not english you can use ajax that. implement view that, given state, return in json cities in state. on template use jquery in on change event of state combo call view , on success fill other combo. it's harder explain implement. excuse writting. i'm on mobile.

php - Extjs with CodeIgniter: Can't delete a user from a grid -

i following following tutorial: http://mrhawley.com/ problem doesn't finish. however, point goes best tutorial around developing extjs app sencha cmd , using codeigniter backend framework. i decided try fill in gaps , guess @ going. got create /read , update methods working nicely can't seem delete work. here extjs store: ext.define('bugtracker.store.user.userlist', { extend: 'ext.data.store', requires: [ 'bugtracker.model.user.userlist' ], constructor: function(cfg) { var me = this; cfg = cfg || {}; me.callparent([ext.apply({ model: 'bugtracker.model.user.userlist', autoload: false, remotefilter: false, remotesort: false, pagesize: 5, sorters: { property: 'username', direction: 'asc' }, proxy: { type: 'rest', actionmethods: { ...

numeric - BCPL octal numerical constants -

i've been digging history of bcpl due question asked reasoning behind using prefix "0x" representation hexadecimal numbers. in search stumbled upon explanation of history behind token. ( why hexadecimal numbers prefixed 0x? ) from post, however, questions sparked: for octal constants, did bcpl use 8 <digit> (as per specs: http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.pdf ) or did use #<digit> (as per http://rabbit.eng.miami.edu/info/bcpl_reference_manual.pdf ) or both of these syntaxes valid in different implementations of language? i've been able find second answer here used # syntax further intrigued me in subject. ( why leading zeroes used represent octal numbers? ) any historical insights appreciated. there many slight variations on syntax in bcpl. for example, while 1 used had 16-bit cells (so x!y gave 16-bit word word address @ x + y (a word address being half of byte address), had need extract byte address , byte values (...

ruby on rails - Airbrake and mountable engines -

my rails application has mountable engine mounted on it. i'm using airbrake gem on both rails application , mountable engine. when use airbrake.notify on mountable gem, uses airbrake rails application. how can seperate airbrake notifications of rails application , mountable engine(by use own corresponding api_keys)?

python - wxPython Update Progress Dialog from separate thread -

i'm attempting run progress dialog isn't on timer updates based on status of files uploading server. don't care how progress bar visually represented, want accurate reflection of process tracking. i've try use while , if on thread.isalive() yet won't give me active bar while process running. here source both bar i'm using thread being called. class progbar(wx.frame): def __init__(self): wx.frame.__init__( self, none, wx.id_any, "please wait." ) self.centre() max = 250 dlg = wx.progressdialog( "please wait.", "please wait while request processed.", maximum = max, parent=self, style = wx.pd_can_abort |wx.pd_app_modal |wx.pd_auto_hide ) keepgoing = true count = 0 while keepgoing , count < max: count += 1 wx.millislee...

Google Street View Marker above street level -

is there way using google street view api display markers above street level? mean, if want place marker on tree or window of building, staying on same lat,lng location. if adding altitude property. perphaps has solved writing custom overlayview? i’d appreciate or direction this. thanks

python - Matching incompletely qualified paths -

let's have series of incompletely qualified paths, missing parts, guaranteed have 2 properties: the final part of both incompletely , qualified paths equal, and the order of each part of incompletely qualified path match actual order of parts of qualified path. for example, p1 = '/foo/baz/myfile.txt' p2 = '/bar/foo/myfile.txt' actual = '/foo/bar/baz/myfile.txt' in case, p1 match, p2 not, because in actual path, bar occurs after foo . easy enough: [actual.split('/').index(part) part in p1.split('/')] ordered list, same comprehension p2 not. but happens if there repetitions in path? p1 = '/foo/bar/bar/myfile.txt' p2 = '/bar/bar/baz/myfile.txt' actual = '/foo/bar/baz/bar/myfile.txt' how can identify p1 match, p2 not (because, although baz occurs after first bar , not occur after second? def match(path, actual): path = path.strip('/').split('/') actual = iter(ac...

hibernate - Spring Inject PersistenceContext -

trying implement ddd architecture aspect oriented tests access database , check if user exists, using aspectj ltw... currently faces 2 issues, don't know if class being injected in spring context. have tried add //@runwith(springjunit4classrunner.class) //@contextconfiguration(locations = {"classpath*:entitytest-context.xml"}) with no sucess. here test trying run. if notice creating entitymanager on @before don't know if proper usage, because when try find object created returned null. package ienterprise.common.aspects; import ienterprise.common.model.companyposition; import ienterprise.common.model.internaluser; import org.junit.before; import org.junit.test; import org.junit.runner.runwith; import org.slf4j.logger; import org.slf4j.loggerfactory; import org.springframework.test.context.junit4.springjunit4classrunner; import javax.persistence.entitymanager; import javax.persistence.entitymanagerfactory; import javax.persistence.persistence; import java...

c# - Direct method from Stored Procedure command text to DataSet? -

private void data_load(object sender, eventargs e) { commonclass_runprocesses commoncls = new commonclass_runprocesses(); dataset ds = new dataset(); ds = commoncls.executesql("select sales = sum(sales) sales_1 ", 17); if (ds != null) { if (ds.tables[0].rows.count > 0) { grddata_load.datasource = ds.tables[0]; grddata_load.allowusertoaddrows = false; grddata_load.autoresizecolumns(datagridviewautosizecolumnsmode.allcellsexceptheader); } how can give storedproc instead of sql command time. need give sp name usp_salesofest ???? try this: ds = commoncls.executesql("exec usp_salesofest", 17); this fastest change without knowing other things commonclass_runprocesses class can do. if has special built-in method running sps, should check them out.

JSP not displaying in Liferay Portlet -

to begin, very new liferay, , may not have clue i'm doing after reading docs. i'm trying set custom jsp page inside of liferay portlet. structure of jsp follows: <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> <portlet:defineobjects /> <html> <head> <title>credit overview</title> <link rel="stylesheet" type="text/css" href="../client/css/creditview.css" /> <link rel="stylesheet" type="text/css" href="../client/css/ecrisportal_styles.css" /> //rest of css links , javascript files... </head> <body> //lists, divs, etc. </body> </html> this placed portlets view.jsp file, however, cannot see being displayed in portlet. of sources , mapping correct seems can't display regular text in portlet. i'm using most-curre...

jsf - Error deploying on Glassfish v.3 after using @SessionScoped -

i new jsf, java ee , having abit of problem small test case trying out faces.xml, jsf , managedbeans.. i have managedbean called beanmanager.java , in it, have 2 fields(name , testname) , method called testcase1() returns string. now, in frontpage.xhtml, have input text box gets name user , once user clicks submit button, testcase1() method called , set testname field of beanmanager.java class user's input reasons-obviously why sending message- when user enter's name , hits search button page navigates displaypage.xhtml , page displays nothing. supposed show name entered user blank. advised use @sessionscoped instead of @requestscoped problem when deploy java ee application on glassfish, following error: exception occurred :error occurred during deployment: exception while loading app : java.lang.illegalstateexception: containerbase.addchild: start: org.apache.catalina.lifecycleexception: java.lang.illegalargumentexception: javax.servlet.servletexception: com.sun.e...

c# - Drawing on a Picturebox with an image in it and saving it -

i'm working on program take anvanced screenshots. i'm stuck bug, hope can me. i can make screenshots code: // screenshot stored in bitmap. bitmap capture = new bitmap(screenbounds.width, screenbounds.height); // code below takes screenshot , // saves in "capture" bitmap. g = graphics.fromimage(capture); g.copyfromscreen(point.empty, point.empty, screenbounds); // code assigns screenshot // picturebox can view picturebox1.image = capture; picturebox1.sizemode = pictureboxsizemode.stretchimage; // code below make form visible again, enables "save" button , stops timer. this.show(); button2.enabled = true; timer1.stop(); drawing on picturebox: color = new solidbrush(color.black); graphics g = picturebox1.creategraphics(); g.fillellipse(color, e.x, e.y, 10, 10); g.dispose(); the problem: can save screenshot, not drawings. hope can ps: if don't und...

python - Trying to use Django, do I need to install Apache manually if Wamp already did -

to make question clear: i have had wamp installed, , brought apache. apache used others django? if wamp apache enough others, apache in wamp directory c:\wamp\bin\apache, not sth c:\programs file...it ok django if have install apache manually django, step install apache, install mod_wsgi? any appreciated strictly interpreted, django doesn't "use" apache. apache 1 way direct requests (via mod_wsgi, example) django app , returns result user. the existing apache install fine. doesn't matter long it's running , reachable. you need install mod_wsgi , configure knows django app. you can find documentation configuring apache , mod_wsgi here: https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/modwsgi/

php - JSON Datatable error -

to start, let me specify have no clue how json works. , in no way strong coder. when change != == says $swhere .= "status == '".aps_done."'"; json parse error says: "datatables warning: json data server not parsed. caused json formatting error." any clue means. <?php include('aps2.database.php'); include('aps2.login.php'); *********** completed request processing code $stable = 'aps2_requests'; $acolumns = array( 'rid', 'description', 'creatoruid', 'photoguid'); $sindexcolumn = 'description'; $slimit = ""; if ( isset( $_get['idisplaystart'] ) && $_get['idisplaylength'] != '-1' ) { $slimit = "limit ".mysql_real_escape_string( $_get['idisplaystart'] ).", ". mysql_real_escape_string( $_get['idisplaylength'] ); } if ( isset( $_get['isortcol_0'] ) ) { $sorder...

build_android.sh Android NDK configure: error: C compiler cannot create executables -

i error build_android.sh: ./build_android.sh configure: warning: if wanted set --build type, don't use --host. if cross compiler detected cross compile mode used. checking bsd-compatible install... /usr/bin/install -c checking whether build environment sane... yes checking arm-linux-androideabi-strip... no checking strip... strip checking thread-safe mkdir -p... /bin/mkdir -p checking gawk... gawk checking whether make sets $(make)... yes checking arm-linux-androideabi-gcc... /home/kkho/home/kkho/adt-bundle-linux-x86-20130917/android-ndk-9/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc --sysroot=/home/kkho/home/kkho/adt-bundle-linux-x86-20130917/android-ndk-9/platforms/android-8/arch-arm/ checking whether c compiler works... no configure: error: in `/cygdrive/c/android_native_development_kit_cookbook/1505ot_codebundle/chapter_8/portingwithbuildsystem/jni/libbmp-0.1.3': configure: error: c compiler cannot create executables i...

Dynamically name class on rails view? -

i have each loop , want use index var name dynamically have tried didn't work. <% (0..4).each |i| %> <div id="item-<%= #{i} %>" class="hold-button"> try this: <% (0..4).each |i| %> <div id="item-<%= "#{i}" %>" class="hold-button"> <% end %> or <% (0..4).each |i| %> <div id="item-<%= %>" class="hold-button"> <% end %> remember: #{} used embedded variable strings. that's why code doesn't work.