Posts

Showing posts from August, 2015

objective c - I need to implement the expandable tableView cell in ios 8 -

Image
in project need implement uitableview of tableview cells expandable , of them independent. if expandable cell need indicate '+' symbol.enter image description here. can 1 please me out i have created small demo, https://github.com/haripalwagh/expandabletableviewcell screenshot 1 : before expanding cell screenshot 2 : after expanding cell @interface viewcontroller () <uitableviewdatasource, uitableviewdelegate> { uitableview *tblview; nsarray *cell0submenuitemsarray; bool issection0cell0expanded; } @end @implementation viewcontroller # pragma mark - view life cycle - (void)viewdidload { [super viewdidload]; tblview = [[uitableview alloc] initwithframe:cgrectzero style:uitableviewstylegrouped]; tblview.backgroundcolor = [uicolor clearcolor]; tblview.delegate = self; tblview.datasource = self; tblview.allowsselection = yes; tblview.scrollenabled = yes; tblview.alwaysbouncevertical = yes; [self.view

jquery - Javascript Slideshow Issue. Getting Blank Screen -

i using following code place javascript slideshow on website - http://leemark.github.io/better-simple-slideshow/ . trying implement example 2 given on link. must doing wrong because blank screen. no images , caption. this code have on website. <div class="bss-slides num2" tabindex="2"> <figure> <img src="bodhgaya.jpg" width="100%" /><figcaption>"snowying" <a href="http://www.flickr.com/photos/fiddleoak/8511209344/">fiddleoak</a>.</figcaption> </figure> <figure> <img src="chardham.jpg" width="100%" /><figcaption>"starlight" <a href="http://www.flickr.com/photos/chaoticmind75/10738494123/in/set-72157626146319517">chaoticmind75</a>.</figcaption> </figure> <figure> <img src="ta

c# - Array with literal strings -

i having string array initialized literal strings below: public static void main() { string[] values = new string[] { "cat", "dog", "mouse", "rat" }; } so have following structure on stack , heap: onstack: variable values holding reference array of string on heap. onheap: array of string referenced values on stack but content of each element of array on heap ? actual string literals ? references pointing string literals in intern pool ? edit: question pointed duplicate this question . case different in terms that another question in context how value type elements of array behave, showed question poser not clear how ref/val type objects allocated on stack/heap. in question clear how ref/val type elements allocated on stack or heap discussing special case when objects string literals. because has deal intern pool , gc. in particular case, considering microsoft .net clr (this important pos

xaml - Powershell WPF Forms changing textbox background to an image -

i trying make background of text box image in powershell. im using xaml converter http://blogs.technet.com/b/heyscriptingguy/archive/2014/08/01/i-39-ve-got-a-powershell-secret-adding-a-gui-to-scripts.aspx load xaml form: <window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="uat" height="300" width="300"> <grid> <button name="btngo" content="go" horizontalalignment="left" verticalalignment="top" width="75" margin="207,240,0,0"/> <textbox name="txtout" horizontalalignment="left" height="233" textwrapping="wrap" text="textbox" verticalalignment="top" width="272" margin="10,0,0,0"/> </grid> </window> the .ps1 file: add-type –assemblyname pr

css3 - Apply a CSS filter only on background -

in following snippet, have applied blur filter on .sub-menu text filtered. how can apply blur filter only on background , not text ? .sub-menu { list-style: none; position: relative; float: left; margin: 0px; padding-left: 0px; z-index: 1; } .sub-menu li { display: block; color: #888888; text-decoration: none; font-size: 14px; line-height: 32px; padding: 0 12px; } .sub-menu li a:hover { color: black; } .sub-menu { position: absolute; top: 100%; left: 0; -webkit-filter: blur(10px); /* chrome, opera */ -moz-filter: blur(10px); -ms-filter: blur(10px); filter: blur(10px); padding: 0 } <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" rel="stylesheet" /> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/boo

symfony - Show data in a table using twig -

i have problem, code : {% order in afilteredigdetails %} {% if order.availability == 0 %} <tr> <td colspan="3" style="background: #ff0000;color:#ffffff">available</td> </tr> <tr> <td> {{ order.gift_id }} </td> <td> {{ order.idm }} </td> <td> {{ order.email }} </td> </tr> {% else %} <tr> <td colspan="3" style="background: #0000ff;color:#ffffff">unavailable</td> </tr> <tr> <td> {{ order.gift_id }} </td> <td> {{ order.idm }} </td> <td> {{ order.email }} </td> </tr> {

How to save json info to an array every 3 hours with php? -

i have access api under link: https://api.adform.com/services/security/login?username=api_user&password=mypassword&callback=jsonpcallback it gets me ticket id in such manner: jsonpcallback({ "ticket": "gezdimzrhftdezrygvstemjngm2dmlkmngrrwgmznha4dimrnge4dazrtmvrtkmjxmuzsytkxlezeetsqjq3dinkbgrdtmmshjfbumqksgnldkm2pkffvitcg" }) the issue every 3 hours expires. how make php script regenerate evey 3 hours , save ticket into: $config = array( "ticket" => "gezdimzrhfrwgmzqgjswkzrngyytcoldmdnrswczrnmiytimjnmnswgztbha2dgylbgi4cyn2cjnbdiu2kivbuewsukzhtoskbirkuyu2eivlfur2wkrbfkwci" ); thanks! you can following similar managing oauth access token refresh: whenever retrieve soap authentication ticket, calculate expiration time adding 3 hours (or less) current time. save expiration time along soap authentication ticket. before each subsequent request, compare current time expiration time. if current time past a

xcode - Parse.com wich shold I choose between ParseFacebookUtilsV4 and ParseFacebookUtils.framework -

parse says here: https://www.parse.com/docs/ios/guide#users-facebook-users to import: #import <parsefacebookutilsv4/pffacebookutils.h> but few lines above, says import parsefacebookutils.framework in docs, said parsefacebookutils.framework ios only. i tried, can't right import you should import parsefacebookutilsv4.framework this framework compatible new facebook ios sdk / api

Add event to google calendar from ios -

i have followed following tutorial fetch events google calendar working fine. https://developers.google.com/google-apps/calendar/quickstart/ios now stuck in insert event ios app can synced web well. please guide me in right direction or post sample code. i using code authorization in viewdidload // initialize google calendar api service & load existing credentials keychain if available. self.service = [[gtlservicecalendar alloc] init]; self.service.authorizer = [gtmoauth2viewcontrollertouch authforgooglefromkeychainforname:kkeychainitemname clientid:kclientid clientsecret:kclientsecret]; authorization seems fine because fetch events working fine. using following code add event - (void)addanevent { // make new event, , show user edit gtlcalendarevent *newevent = [gtlcalendarevent object]; newevent.summary = @"sample added event"; newevent.de

c# - sqlite in windows phone 8 runtime -

Image
i trying make sample sqlite db app in windows phone 8 using this example . now not able add sqlite.dll in project.

java - Play Framework Ebean query retreival -

i want show previous 5 transactions of signed in user in banking app. public static model.finder<string,transaction> find = new model.finder<string,transaction>(string.class,transaction.class); public static list<transaction> fetchtransactions (string currentuser) { return find.where().eq("user.username",currentuser).setmaxrows(5).findlist(); } i tried ebean.find function: @inject list<transaction> list = ebean.find(transaction.class).fetch("transnature").fetch("amount").where().eq("user.username",user.findbyemail(request().username()).username).findlist(); what doing wrong? if want last 5 transactions, have include order respective column, transactiondate descending order. otherwise ebean default, fetch rows order id in ascending order. first 5 rows transaction table. try this, public static list<transaction> fetchtransactions(string currentuser) { return find.where().eq("user.u

android - Aligning an image to the right of RelativeLayout without streatching -

i have relative layout has background image. set height , width wrap_content. works fine. want place image @ topright corner of relative layout. use alignparentright = true. problem relative layout stretches horizontally fill screen. i have done reading , came across "circular dependency pitfall" from relativelayout doc: class overview a layout positions of children can described in relation each other or parent. note cannot have circular dependency between size of relativelayout , position of children. example, cannot have relativelayout height set wrap_content , child set align_parent_bottom here xml sample <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/popup_b" android:layout_width="wrap_content" android:layout_height="wrap_content" > <imagebutton android:id="@+id/ibclosedialog" and

javascript - Convert php Herirachical array to view -

i have heirachical db structure. using recurisive function have stored db values in heirarchical structure array. want display array in format in view .(like tree ). there library in codeigniter supporting that. ? db pk parent name ------------------------- 1 0 animals 2 1 cat my array array ( [0] => array ( [pk] => 1 [parent] => 0 [name] => animals [childs] => array ( [0] => array ( [pk] => 2 [parent] => 1 [name] => cat ) ) )

immutability - Correct way to permanently alter a JavaScript string -

in ruby, if want modify string , have change original string, can use ! bang character. string = "hello" string.capitalize! > "hello" string > "hello" in javascript, can't find equivalence. modifying string uppercase instance returns original string after first instance. var string = "hello"; string.touppercase(); > "hello" string > "hello" i know can save variable such var uppercasestring = string.touppercase(); but seems inefficient , undesirable purposes. i know must obvious, missing? the return value of touppercase new string capitalized. if want keep , throw away original, use this: string = string.touppercase(); btw, when entering js statements on command line of node.js , similar environments, prints result of evaluating each expression, why see uppercase version if type string.touppercase(); as have deduced has no effect on original string.

html5 - Placing checkbox over an image without using 'top' and 'position:absolute'? -

is possible put checkbox on image without using 'top' , 'position:absolute' ? <div class="main"> <img src="http://www.standard.co.uk/incoming/article9760552.ece/binary/original/rooney.jpg" class="image"/> <input class="checkbox" type="checkbox" value="1" /> </div> jsfiddle there's few possible ways. if want avoid top , absolute position using negative margins. or if want checkbox checked when image clicked wrap image in label , tie label checkbox. i've done both here . html: <div class="main"> <label for="checkbox"> <img src="http://www.standard.co.uk/incoming/article9760552.ece/binary/original/rooney.jpg" class="image" /> </label> <input id="checkbox" type="checkbox" value="1" /> </div> css: .image { height: 200px; width: 250px; }

c# - An unhandled exception of type 'System.InvalidOperationException' occurred in System.dll -

i executing code below : class program { static void main(string[] args) { performancecounter performancecounter = new performancecounter("network interface", "bytes sent/sec", "intel(r) 82579v gigabit network connection"); console.writeline(performancecounter.nextvalue().tostring()); } } i'm getting exception. an unhandled exception of type 'system.invalidoperationexception' occurred in system.dll additional information: instance 'intel(r) 82579v gigabit network connection' not exist in specified category. i have tested parameters windows perfmon tool , working in code giving exception. can please help.. have checked if name spelled correctly? minor error, won't work. to check names exist in category, try (as suggested here: https://stackoverflow.com/a/29270209/1648463 ) performancecountercategory category = new performancecountercategory("network interface"); string[

javascript - How do I add references to HTML elements in to my JSON? -

the cytoscape.js example shown here has reference in json: container: document.getelementbyid('cy'), eg. cytoscape({ container: document.getelementbyid('cy'), elements: [ { // node n1 //... snip }] }); if manually create json string, , call cytoscape() on it, works fine. however, i've returning json string servlet, , on client side, need add container value. i've tried: function updategraph(json) { console.log(json); pjson = json.parse(json); pjson["container"] = document.getelementbyid('graph-container'); json = json.stringify(pjson); console.log(json); cytoscape(json); } but show container element as: "container":{} what's correct way add html element reference? document.getelementbyid('graph-container'); will return html element embedded within <>. javascript object notation(json) cannot hold such elements, cannot parse such elemen

jQuery/Ajax success function not rendering html -

i have div <div id="message"></div> , trying add contents div using ajax success. this how ajax code looks like: var data = $("form#password_forgotten").serialize(); $.ajax({ type: "post", url: "./includes/process_password.php", data: data, cache: false, success: function (response) { console.log(response); $('#message').html(response); } }); but can not populate #message div ajax response. ajax coding working me , can console. <div class='alert alert-danger alert-dismissible' role='alert'> <strong>oops!</strong> email address not recognised. please try another. </div> can tell me whats wrong this? thank you. as per conversation in comments now found #message div populating, hiding page. - oops! email address not recognised. please try another. ,

mysql - Yii2 : Model returning NULL value (not set) when using Widget Detail VIew -

i want ask using detailview widget. want show data join table, modified function findmodel($id) : protected function findmodel($id) { if (($model = tpq::findone($id)) !== null) { $data = $model::findbysql("select * tpq, kurikulum, pengurus tpq.kurikulum_id = kurikulum.kurikulum_id , tpq.pengurus_id = pengurus.pengurus_id , tpq_id = $id")->all(); return $data; } else { throw new notfoundhttpexception('the requested page not exist.'); } } i use function in view public function actionview($id) { return $this->render('view', [ 'model' => $this->findmodel($id), ]); } my view : <?= detailview::widget([ 'model' => $model, 'attributes' => [ 'tpq_id', 'tpq_nama', 'tpq_alamat', 'tpq_koordinat', 'tpq_berdiri', 'tpq_aktif', '

Exception in thread “main” java.lang.NoClassDefFoundError: (wrong name -

Image
i want execute java in lexing folder. error wrong name based on screenshot of code, need add package deceleration lexing start of source file. see creating , using packages more details so using... package lexing; public class lexing { public static void main(string args[]) { system.out.println("hello world"); } } i placed in lexing directory (calling lexing.java ). then, @ command line (in directory containing lexing directory), typed: javac lexing\*.java followed by java lexing.lexing which output hello world having said that, highly recommend making use of suitable ide

ruby - Make Gollum Gem work with Rails 4 -

i need add wiki pages application , i've read gollum gem. since i'm new rails i'm not sure how integrate gems installed separately working project. what next steps after installing gem? how accessible controller? have create own controller, view , model? plus, can find valid examples of how manage simple wiki pages? git repository lacks examples https://github.com/gollum/gollum @edit taking post example, yourapplication in accepted answer? how mount github's gollum wiki inside rails app? after following these steps able use, example, markdown syntax in view , translated formatted html? recently, i've tried mount gollum onto app. here codes routes.rb require 'gollum/app' rails.application.routes.draw wiki_options = {:universal_toc => false} precious::app.set(:gollum_path, rails.root.join('wiki').to_s) precious::app.set(:default_markup, :markdown) # set favorite markup language precious::app.set(:wik

c# - Xamarin mediaPicker.TakePhotoAsync crashes app -

i have xamarin.forms app uses xlabs, working fine, started crash app, if take photo or press button photo screen, googling around 4 hours , still have no idea why happening, ideas or thoughts, please help! here lines of code: private async task takepicture() { mediapicker = resolver.resolve<idevice>().mediapicker; try { var mediafile = await mediapicker.takephotoasync(new cameramediastorageoptions { defaultcamera = cameradevice.front, maxpixeldimension = 1, percentquality = 2, }); var image = getresizedimage(mediafile.source, 990, 560); onimageupdate(this, image); } catch (exception ex) { this.status = ex.message; } } my permission alright: <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.per

Android: How to update state of one view based on the state of other -

Image
i facing issue solution might simple one, tries have not succeeded. have parent view container contains 3 child views have on onclick event handlers declared , perform different actions. trying add statelist drawables each of these different states colors of child views change. looks - child view 3 has own statelist , works independently , have need. however, want state of child view 1 , 2 should change simultaneously when state of either changed while perform independent actions on click. basically, if pressing (pressed state) child view 1 changes color maybe, same should happen 2 , vice versa. while, child view 3 should unaffected. tried number of ways workaround statelist drawables no success. can please me out issue? believe there should elegant way handle in android. thanks! how implement interface, kinda: onstatechangelistener() { onstatechanged(int color, int whatever); } for both of related views , listen each other state changing.

android - Duplicate Classes to handle app flow (with explicit intents) -

i have 3 different options in app allow user through several of same classes @ different times, ie 1) sharing friend: mainclass -> invitefriendorgroup -> sharing -> im 2) creating event friends mainclass -> invitefriendorgroup -> createevent -> openeventspage 3) creating event no friends: mainclass -> createevent -> openeventspage my issue intents allow navigation without many duplicate classes. example, in invitefriendorgroup class, onlistitemclick method intent = new intent(getactivity(), specialsharing.class); startactivity(i); which means open 1) above allowed. easy solution make duplicate classes, different intents in them, ie.invitefriendorgroupevent, or invitefriendorgroupsharing.... but there has better way? you shouldn't duplicate classes. pass parameters using "extras" in intent control options available.

php - Multiple browser connections getting the same DB object -

running 2 concurrent scripts want access database sequentially each's autoincrement primary keys sequential. i.e. running them both (instance , instance b) @ time lead 1-a, 2-a, 3-a, 1-b, 2-b, 3-b however, get 1-a, 1-b, 2-a, 2-b ,3-a ,3-b after transactions , locking tables didn't work have expected did deeper looking , appears both scripts (even when run in different browsers) getting same connection. both in same session 1 not block other. there can force them different connections (changing mysqli or pdo not option existing system)? chrome: object(db_mysql)#10 (26) { ["phptype"]=> string(5) "mysql" ... firefox object(db_mysql)#10 (26) { ["phptype"]=> string(5) "mysql" ... db creation done dsn string below. (there other logic in there) mysql://root:@127.0.0.1/xxx?new_link=true queries run: lock tables xxxx write set autocommit=0 transation start >>insert 1 >>insert 2 >>insert 3

javascript - Single page applications and <form> elements -

are there still benefits of using <form> element instead of let's <div> element in context of single page application? purpose of <form> element makes sense me if "form" submission isn't made ajax call (i'm talking more traditional way of submitting form, input/button of type "submit" , action attribute of form element describes url call), otherwise not see it's utility (maybe search engines?). semantically, using <form> clearer <div> . if still want form work without javascript, you'd better choose <form> (since used word application , may not considered though). more importantly, it'll painful of using <div> if care accessibility .

html - CSS table cell alignment and ellipsis not working -

Image
i have html code not hidden , cut off using css ellipsis. i have tried many things fix issue, nothing works me (and killing me cannot fix such simple issue). have read posts css ellipsis. here visual representation of have: as shown 11/2001 (2 annees, 10 mois) dropped next line , ellipsis not take effect. i trying keep 11/2001 (2 annees, 10 mois) next prompt date d'achevement , cut off (hidden) ellipsis if value long, in case. here html <div id="live_preview" class="livepreview_resumewrapper1"> <div class="resumestylewrapper25"> <div class="resumestyleoptimisedcontainer25"> <div class="resumestylestandardheadings25">emploi détails d'histoire</div> </div> <div class="resumestylewrapper25"> <div class="resumestylestandardtablerow25"> <div class="resumestylestandardcont

javascript - AngularJS localstorage for a factory -

i newbie ionicframework , following "starter tab" template , made few modifications "delete" , "bookmark" items factory. my books.js contains factory looks follow: .factory('books', function() { // books data var books = [{ id: 0, title: 'sample title', author: 'sample author', category: 'horor, fiction', cover: '/cover.jpeg', details: 'some details book', chapters: [ { id : 1, name: 'chapter 1', filename: 'chapter1.html', }, { id : 2, name: 'chapter 2', filename: 'chapter2.html', } ] } ..... return { all: function() { return books; }, // remove book list remove: function(book) { books.splice(books.indexof(book), 1); }, and controllers.js looks this: .... .controller('dashctrl', function($scope, books) { $s

powershell - Is it possible to create an Umbraco site from the Azure Marketplace using poweshell? -

Image
morning, i keep getting requests set umbraco sites developers. i have done bit of searching and, wondering if possible use powershell create umbraco site from azure marketplace using powershell . i create vms, example, using following commands: get-azurevmimage new-azurequickvm but cand find websites (web apps) market place. there use in in portal: note : must done using market place. update question: have got further @theadriangreen. now have following after run command: sitename: website name hostingplanname: basic serverfarmresourcegroup: i have no idea sitelocation: australia southeast servername: is database server name? serverlocation: australia southeast administratorlogin: is database admin login name? databasename: is database admin login password? webdeploy_databaseusername: no idea webdeploy_databasepassword: no idea @theadriangreen hope can clarify of these me? thanks russ yes possible. command get-azureresourcegrou

node.js - Is there way to offset timezone in Cassandra using nodejs connectors? -

cassandra server storing times in utc. it's offsetting times based on tz environment when connecting via commandline. however, when connecting via node-cassandra-cql, times coming in utc. is there way offset db connection specific timezone or timezone offset? node-cassandra-cql eol, should use datastax node.js driver . both cassandra timestamp , ecmascript date represent single moment in time (without timezone information), date stored , retrieved same seeing differences in string representation of date. you can use date methods string represent in way or change utc offset or can use momentjs package use different timezone 1 in server.

java - Short Circuiting vs Multiple if's -

what differences between this: if(a && b) { //code } and this: if(a) { if(b) { //code } } from know b evaluated in first code block if a true, , second code block same thing. are there benefits of using 1 on other? code execution time? memory? etc. they compiled same bytecode. no performance difference. readability difference. huge generalization, short-circuiting looks better nesting clearer. boils down specific use case. i'd typically short-circuit. i tried out. here's code: public class test { public static void main(string[] args) { boolean = 1>0; boolean b = 0>1; if (a && b) system.out.println(5); if (a) if (b) system.out.println(5); } } this compiles to: 0: iconst_1 1: istore_1 2: iconst_0 3: istore_2 4: iload_1 5: ifeq 19 8: iload_2 9: ifeq 19 12: getstatic #2 15

class - Declaring and using multiple Objective-C classes in a single file -

i've used objective-c in sterile, textbook situation, have single class defined within single file, , having set of files, 1 implementation, , 1 interface. i'm ready start traveling less preferable, quick-and-dirty means build classes, declaring , using multiple classes within single implementation file. (edit) don't plan in production code, test ideas off side if will, still able access data in full application, rather creating separate sandboxed xcode project it, not have access data i'll need test idea. all educational material can find demonstrates sterile method of 1 .h , 1 .m file , single interface , implementation. so want have classa, classb, , classc defined in classa's implementation file. still need declare interface classb , classc , in order in classa can declare stuff , have work properly. thanks lot. yes, have declare same things. should declare interfaces prior implementations. but suggest not done save time , if there close

javascript - How to concatenate 3 dynamic value text boxes and move them to clipboard -

sas per title i'm trying concatenate 3 textboxes have dynamic values based on radio button presses. i'm new html , java have literally been self teaching off google come it's messy. code far follows: http://jsfiddle.net/jkxbwlwt/ <input type="radio" name="r3" onclick="myfunction2(this.value)" value="ca$!">only want talk case owner<br> <input type="radio" name="r3" onclick="myfunction2(this.value)" value="vo$!">transfer voicemail<br> <input type="radio" name="r3" onclick="myfunction2(this.value)" value="em$!">no eos entry required<br> <input type="radio" name="r3" onclick="myfunction2(this.value)" value="na$!">n/a<br><br> <input type="text" id="result2"> </form> here small exerpt of how 1 part of code works. rest in js

php - Wordpress `get_the_post_thumbnail` Source URL -

this return formatted html <img ... > tag. $thumb_id = $post->id; $picturelink = get_the_post_thumbnail($thumb_id, 'medium'); what function can use 'src' tag value? i tried other wp functions attachments these did not return useful reason. i accept wp function or parser extract src tag's value. update: parser extract src tag's value. $doc = new domdocument(); $doc->loadhtml($picturelinkhtml); $xpath = new domxpath($doc); $picturelink = $xpath->evaluate("string(//img/@src)"); you can lot easier parsing it. first need attachment id post id. can grab source includes url, width , height. here more information . $image_id = get_post_thumbnail_id($post->id); $image = wp_get_attachment_image_src($image_id, 'large'); echo $image[0];

What is the name of global variable in bigcommerce which is used to get the email of the Store Profile? -

i searched on developer portal of bigcommerce not found. https://developer.bigcommerce.com/themes/global_variables can me? this global variable shows email address under store settings %%global_adminemail%%

mainframe - Loop until data set is not in use with JCL -

i working in mainframe , need wait dataset released execute automatically job. know simple way loop until dataset not in use in jcl? looking on web , found solutions rexx seemed complicated such simple thing need. have never used rexx. regards! p.d. also, data set not exist. edit: need becouse run xcom job transfer file of system mainframe dataset. problem when job finish, maybe file still beign transfered, , wait transfer completed before start next job. maybe editing sentence of next job associated dataset. the easy way ensure file transfer package allocates dataset old disposition, create system level enqueue on dataset , prevent job running until enqueue released. many file transfer packages offer sort of 'file complete' exit can trigger job once dataset transmission complete. but can't loop in jcl. can in rexx, has host of issues have deal with, not @ simple.

python - Is There a Way to Make a Rect Transparent in Pygame? -

is possible make rect transparent in pygame? need because i'm using rects particles game. :p pygame.draw functions not draw alpha. documentation says: most of arguments accept color argument rgb triplet. these can accept rgba quadruplet. alpha value written directly surface if contains pixel alphas, draw function not draw transparently. can create second surface , blit screen. blitting alpha blending , color keys. also, can specify alpha @ surface level (faster , less memory) or @ pixel level (slower more precise). can either: s = pygame.surface((1000,750)) # size of rect s.set_alpha(128) # alpha level s.fill((255,255,255)) # fills entire surface windowsurface.blit(s, (0,0)) # (0,0) top-left coordinates or, s = pygame.surface((1000,750), pygame.srcalpha) # per-pixel alpha s.fill((255,255,255,128)) # notice alpha value in color windowsurface.blit(s, (0,0)) keep in mind in first case, else draw s blitted al

ruby on rails - FactoryGirl not creating data in view -

so factory: factorygirl.define factory :member email 'admin@admin.com' password 'rootroot' first_name 'rinholds' last_name 'jordan' expiration time.local(2015, 6, 21, 15, 13, 0) start_date time.local(2015, 4, 21, 15, 13, 0) role 2 end end this spec: require 'rails_helper' describe dashboardcontroller, type: :controller 'should display chart', js: true member = create(:member) member.save! member.confirm binding.pry visit '/' end end this root_path(): body = yield = member.first.email ~ when run spec returns undefined method `email' nil:nilclass in view. when put binding pry in view, , run member.all returns empty array! how posible? how force factorygirl create real database

python - How to access a class from a dynamically imported module -

i have dynamically imported module: module_object = importlib.import_module(audio_module) now if list of attributes associated module: print dir(module_object) i following: ['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'aud_shell', 'shlex', 'sys'] i want access "aud_shell" class located within module. since module dynamically imported, not have knowledge of class has within it. how search within imported module class name , access class? for example: dynamically import module obtain name of class within module access method within class in end have this: module_object.aud_shell.some_method() i hope explained correctly. let me know if didn't make sense. thanks. actually 5 minutes after posting question able solve it, in case else trying same thing here is: after have imported module dynamically: module_object = importlib.import_module(audio_mo

java - How to access folders outside of a JAR -

i have project in eclipse reads , writes new files- works eclipse, when save jar no longer works. example: readconfig(newfile(settings.class.getprotectiondomain().getcodesource().getlocation().getpath() + "chronos/functions/config")); therefore, how load files outside source (assuming there no way inside jar)?. example, if had jar in folder called data- type in access data folder? if need read should able use getresourceasstream() read file inside of jar. if want read , write use folder next jar file. see here answer.

objective c - How to read and write XML on a web service with iOS -

i'm working on switching ios app on storing data using archiving accessing xml files on web service, in order have 1 central database many users. i've found resources explaining how use nsxmlparser, little explains how create or edit xml files on database information entered text fields on app. the web service , running, catch-22 can't verify parser works without being able enter data , having save web service. the data pretty basic. example, might have car object has few nsstring properties- year, make, model, color, , on. need able add , delete cars, edit properties. suggestions? in terms of reading data, wrote simple xml parser ios called coniferxml. can check out @ github . if doesn't work out there library on github little more complex same thing.

upload - PHP: Uploading File In a Network Folder -

i'm trying write application upload files network folder. here code: $root = "\\\\test04\\storage\\midia\\"; $dir = "26172"; //hardcoded testing reasons echo " ".$root." is_writable? ".var_export(is_writable($root))."<br />"; //returns true echo " ".$root." is_dir? ".var_export(is_dir($root))."<br />"; //returns true foreach($_files['anexo']['name'] $key => $value) { $name = $_files['anexo']['name'][$key]; if(!move_uploaded_file($name, $root."\\".$dir."\\".$name)) { echo "upload error in file $name em $root\\\\$dir\\\\$name <br />"; print_r(error_get_last()); } else { echo "upload of file $name complete."; } } but catch error. _error_get_last()_ empty. move_uploaded_file returns false . copy returns false.

python - How do you use the `secondary` kwarg to fit this situation in SqlAlchemy? -

i have situation user can belong many courses, , course can contain many users. have modeled in sqlalchemy so: class user(base): __tablename__ = 'users' id = column(integer, primary_key=true) class course(base): __tablename__ = 'courses' id = column(integer, primary_key=true) archived = column(datetime) class coursejoin(base): __tablename__ = 'course_joins' id = column(integer, primary_key=true) # foreign keys user_id = column(integer, foreignkey('users.id')) course_id = column(integer, foreignkey('courses.id')) in system, have ability "archive" course. marked datetime field on course model. give user model relationship called course_joins contains coursejoins respective course hasn't been archived. i'm trying use secondary kwarg accomplish so: class user(base): __tablename__ = 'users' id = column(integer, primary_key=true) course_joins = rel

c++ - Best opencv version to use for face and eye detection -

i'm newbie , want know version of opencv should use face , eye detection . have found since opencv 3.0.0 offers new api in c++ there more speed in multiple cores , more non faces can detected want use in detection of eye direction lot you can use new one,i find has trained lot of classifers,whice in opencv/data/haarcascades/ ,so can use directly or train new 1 yourself

java - Spring 4: MappingJackson2HttpMessageConverter does not support application/javascript for jsonp -

using spring 4.1.6.release , jackson libraries v2.5.4 want use jsonp in rest services using spring 4; spring 4 supports jsonp out of box. configuration <mvc:annotation-driven content-negotiation-manager="contentnegotiationmanager"> ... </mvc:annotation-driven> using contentnegotiationmanager in following manner <bean id="contentnegotiationmanager" class="org.springframework.web.accept.contentnegotiationmanagerfactorybean"> <property name="defaultcontenttype" value="application/json" /> <!-- configuration of path extension based contentnegotiationstrategy --> <property name="favorpathextension" value="false" /> <!-- configuration of request parameter based contentnegotiationstrategy --> <property name="favorparameter" value="true" /> <property name="parametername" value="formattype&q