Posts

Showing posts from September, 2014

Loop through a JSON object in Java -

Loop through a JSON object in Java - i having hard time understanding how loop through below json object [ {"course_slug":"course-4504","course_description":"a principle refers fundamental truth. establishes cause , effect relationship between t...","course_name":"principles of management","course_thumb":"http:\/\/i1117.photobucket.com\/albums\/k594\/thetutlage\/principles_of-management.jpg?t=1359623785"}, {"course_slug":"course-4502","course_description":"management accounting or managerial accounting concerned provisions , utilize of accoun...","course_name":"management accounting","course_thumb":"http:\/\/i1117.photobucket.com\/albums\/k594\/thetutlage\/management_accounting.jpg?t=1359623495"}, {"course_slug":"course-4503","course_description":"quantitative techniques...

Ambiguity in java generics 1.6 earlier version and the later -

Ambiguity in java generics 1.6 earlier version and the later - recently encounter weird problem respect java generics . simplified problem snippet below : public static void main(string[] args) { string s = "hello"; system.out.println(blindlyreturngetobject()); } private static <t> t getobject() { homecoming (t) new object(); } private static <t> t blindlyreturngetobject() { homecoming getobject(); } in case of jdk 1.6.0_03 , before versions, getting infamous compilation error type parameters of <t>t cannot determined; no unique maximal instance exists type variable t upper bounds t,java.lang.object whereas code works in jdk 1.6.0_26 , later versions. is there anyway rid of issue before version of jdk 1.6 since our build servers still running in before version of jdk 1.6 ? while googling related issue, came across bug raised in sun related generics type inference issue....

sublimetext2 - How to terminate a program running from the Sublime Text 2 terminal once entering an infinite loop? -

sublimetext2 - How to terminate a program running from the Sublime Text 2 terminal once entering an infinite loop? - even if close sublime process continues go, seeing laptop revs until slowing downwards crawl few minutes later. i'm on mint linux, , can't seem kill process terminal either. execute command: ps -a | grep sublime result illustration : 2547 ? 00:02:37 sublime_text you kill process : kill -9 2547 loops sublimetext2 infinite-loop sublimetext

jquery - Keep transforming elements on top of other elements -

jquery - Keep transforming elements on top of other elements - i'm learning utilize css3 3d transforms, i'm having problem keeping elements transforming on top of other elements. this have far: http://bos.rggwebdesigns.com/ as can see, site follows standard z-index rules hierarchy of 3 .row divs, meaning cards in first row behind card in sec row , on. i tried adding lines transform script (in main.js) selects .row element above clicked .card element , sets z-index 1000, doesn't seem work. $(document).ready(function() { $('.card').click(function() { $('.row').removeclass('top'); $('.card').not(this).removeclass('flipped'); $(this).parents().eq(2).toggleclass('top'); $(this).toggleclass('flipped'); }) }); to reiterate, i'm trying ensure parts of transforming element appear above every other element. according see z-index needs relative. if set positio...

javascript - RequireJS R.js not seeing dependent require files if assigned to a variable in a nested require -

javascript - RequireJS R.js not seeing dependent require files if assigned to a variable in a nested require - i'm having problem r.js finding file dependencies on nested require calls. if pass require array of strings, compressor works fine , file dependancies found. define([ 'jquery', 'underscore', 'backbone' ], function() { require(['views/mobilenavview']); // works fine! }); if pass require array of strings i've assigned variable, compressor doesn't find file dependencies. var requiredfiles = [ 'views/mobilenavview' ]; define([ 'jquery', 'underscore', 'backbone' ], function() { require(requiredfiles); // doesn't work! }); what causing compressor not find file dependencies if assign array of strings variable? here app.build.js ({ baseurl: '.', findnesteddependencies: true, mainconfigfile: 'main.js', name: ...

SQL Query add calculated temp column -

SQL Query add calculated temp column - i returning 2 columns in query ( date , total ). e.g. date1, 11231 date2, 11239 date3, 11341 what wondering if create column in query shows me difference lastly total? i not able alter construction of sql table @ all, best suited in view? thanks help. regards jason use lag() analytic function if available in version of sql-you did not specify. there lead() function available... sql

php - Security of unzipping user submitted files -

php - Security of unzipping user submitted files - not much of coding problem here, general question relating security. i'm working on project allows user submitted content. key part of content user uploads zip file. zip file should contain mp3 files. i unzip files directory on server, can stream sound on website users hear to. my concern opens potentially damaging zip files. i've read 'zipbombs' in past, , don't want malicious zip file causing damage. so, there safe way of doing this? can scan zip file without unzipping first, , if contains other mp3's delete or flag warning admin? if makes difference i'm developing site on wordpress. utilize built in upload features of wordpress allow user upload zip file our server (i'm not sure if there's form of security within wordpress scan zip file?) code, extract mp3s zip, ignore everthing else $zip = new ziparchive(); $filename = 'newzip.zip'; if ($zip->open($file...

c# - Regular Expression to check doubles, triples etc -

c# - Regular Expression to check doubles, triples etc - i need regular look retrieve no of doubles, triplets, tetras etc telephone number following example, number 1001055522 should homecoming me group numbers ============================= doubles 00 22 triplets 555 this regex when used regex.matches produce exact double or triple (not part of longer consecutive sequence). due greediness of quantifier. (\d)\1+ demo well, rest check length of string , count... leave you. c# regex

operating system - connecting from Linux to windows without logging off the current user on windows -

operating system - connecting from Linux to windows without logging off the current user on windows - what i'm trying accomplish log linux windows machine beingness used 1 user should not logged off , scheme should working both users simultaneaously .i'm using krdc connect windows machine linux,which logs off user when other user logs in.is there other way accomplish intension. thanks , regards you need have real terminal services installed. windows (home,professional, etc) can enabled have terminal services 1 single session. if install terminal services need pay license users. to allow multiple connection should utilize vnc/teamviewer (is simple way accomplish want). operating-system remote-desktop multi-user

c# - Questions and help regarding the implementation of Quartz.net 2.0 -

c# - Questions and help regarding the implementation of Quartz.net 2.0 - i trying write simple proof of concept application implementing quartz.net 2.x. have never seen such poor excuse documentation. have many questions can't seem answered. seems documentation assumes have been using version 1.x , migrating 2.x (actually portion of 2.x tutorial 1.x specific.) well, i've never used java based quartz, quartz.net 1.x, , not 2.x. seek lay question(s) out organized can. reply of them or direction documentation, tutorial, etc. welcome. ultimately want implement quart.net 2.0 fire trivial job (embedded. not service.) what construction of job quartz.net executes? method, class, etc? seems class, can't seem find definitive reply question. can explain factory, store, , datamap , when should used? what's xml? tutorial show xml beingness used... don't. when , why utilize xml? i'll stop there now. hope has time help me through this. much grateful. whi...

memory leaks - Cannot Undeploy a web-app completely in Tomcat 7 -

memory leaks - Cannot Undeploy a web-app completely in Tomcat 7 - i using manager app in tomcat 7, , unable undeploy application completely. it says fail - unable delete [f:\apache-tomcat-7.0.33\webapps\balaji]. continued presence of file may cause problems. i read somewhere because of phenomenon called memory leak , , if prepare issue solved. can tell me memory leak in tomcat 7, , how can prepare ?? using windows 7 os. if able prepare un-deploy , re-deploy process run smooth ? this mutual in windows environment there solution : open context.xml /tomcat/conf folder , modify context match : <context antiresourcelocking="true"> edit: updated properties fallowing @janm comment. contained 'antijarlocking' tomcat memory-leaks tomcat7

Get productID of the product being edited in Magento -

Get productID of the product being edited in Magento - is there way, in magento, productid of product beingness edited on admin backend? i found this: mage::registry('current_product'); but doesn't seem 1 beingness edited. edit: if makes difference, i'm trying extension listening event: catalog_product_gallery_upload_image_after the current product's id in url. can retrieve parameter so: $productid = mage::app()->getrequest()->getparam('id'); if want load product object, store id , use $product = mage::getmodel('catalog/product')->load($productid); edit: looks you're using observer. observer file assume not extend part of magento. (is file? http://svn.magentocommerce.com/source/branches/1.7/app/code/core/mage/adminhtml/controllers/catalog/product/gallerycontroller.php) seek obtaining action , getting request way $action = $observer->getaction(); $productid = $action->getrequest()->getp...

objective c - Filtering string for date -

objective c - Filtering string for date - i have string looks this: "51403074 0001048713 1302130446 tomtom101 order 51403074-3-278065518: ontvangen" this string filtered array contains similar strings. string contains relevant info , irrelevant data. part of string relevant is: 1302130446 . number represents date , time (yy/mm/dd/hh/mm). because part date , time not same every time. how can filter string have string contains relevant part. sorry still learning ios dev. if date string 3rd word split nsstring word array as nsstring *mystring = @"this test"; nsarray *mywords = [mystring componentsseparatedbystring:@" "]; and access 3rd item in array string wanted. edit (due comment): sure right string word array need unique identifier string. 'tomtom101' follows date string or thing else... **edit 2 (due need of illustration code) nsuinteger counter = 0; nsuinteger datestringindex = 0; for(nsstring *s...

git - files disappearing after pushing to local branch and remote -

git - files disappearing after pushing to local branch and remote - in git repo, have 3 branches: master dev gh-pages my primary thought commit info dev, gh-pages (and force remote storing or backing up). after done.. merge master. what's interesting is.. when commit info dev, gh-pages , force them, files disappearing! (why happening?) now, after happened, want clone repo, work on again.. there no files on master, cloning nothing. i guess used git merge master while in either dev or gh-pages , merges from master , not to master . you need first switch master, merge branch want merge from: git checkout master git merge <branch> by way, gh-pages should separate code. it's documentation of github repository, , files have nil code. don't merge content master . git github

How to apply "wrap when typing reaches right margin" in Intellij IDEA? -

How to apply "wrap when typing reaches right margin" in Intellij IDEA? - if set "wrap when typing reaches right margin" in cody style -> general preferences , defined new margin, how apply new settings files reformatted? very easy: select root of module in project view in code menu select "reformat..." edit forgot mention of import detail: ide settings > code style > java > wrapping , braces > ensure right margin not exceeded must checked. (at to the lowest degree reformat java files, same checkbox other files exists) intellij-idea

AngularJS ng-repeat with data from service -

AngularJS ng-repeat with data from service - originally in app, created controllers basic $http calls resource getting id of object url ($routeparams). ng-repeat display results correctly. however, noticed refreshing in later view (different controller) wiped out info , broke page. so, created function on service used in multiple controllers, check whether info has available , react follows: 1) if resource defined, homecoming (no api call) 2) if resource not defined, id url , api 3) if resource not defined & can't id, homecoming false. however, broke code: template rendered before service returned data, , ng-repeat did not update. code looks this: angular.module('myapp', ['ngcookies']) .config(...) .service('myservice', ['$cookies', '$http', function($cookies, $http) { mydata = {}; homecoming { getdata:function(dataid) { if(mydata.name) {return mydata); ...

c# - Could not load file or assembly or one of its dependencies. Access is denied -

c# - Could not load file or assembly or one of its dependencies. Access is denied - i running c# winform client/server application. i added (referenced) 3rd party dll in server side project. everything compiles @ run time error: not load file or assembly '' or 1 of dependencies. access denied. i believe error iis (7.0) related. how can right error or how can go debugging error? thanks in advance. it means user under web app running not have read file access assembly (or 1 of dependencies). you need grant read file access on assembly web app user. c# winforms iis client-server

qt creator - Qt Parent Child Relationships -

qt creator - Qt Parent Child Relationships - i'm running test understand parent/child relationships in qt , have question how can view these relationships in qt creator debugger. when start demo application, here debugger shows: because phone call qt's dumpobjecttree() before add together widgets, tree empty, except mainwindow's layout. that's expected. when close application, , ~mainwindow destructor called, phone call dumpobjecttree() again, time, of widgets created show in tree. if called dumpobjecttree() after window destroyed, shouldn't tree empty again? am not destroying kid widgets correctly, or misunderstand info displayed dumpobjectree() function? mainwindow::mainwindow(qwidget *parent) : qmainwindow(parent) { qdebug() << "window initialized-------------"; dumpobjecttree(); this->buildlayout(); } void mainwindow::buildlayout() { qwidget *window = new qwidget(this); this->setobjectn...

javascript - jQuery replace Start and End tag in html document -

javascript - jQuery replace Start and End tag in html document - i have next jquery snippet should replace code such [button] text here [/button] like: <a class="button">text here</a> the javascript have following: $(document).ready(function() { var buttonstart = $("body").html().replace(/\[button\]*/ig,'<a class="button">'); $("body").html(buttonstart); var buttonend = $("body").html().replace(/\[\/button\]*/ig,'</a>'); $("body").html(buttonend); }); the problem having keeps replacing other elements on page have nil tags [button] [/button]. insance following: <div id="middlebarleft"></div> also gets replaced into <a class="button"><div id="middlebarleft"></div></a> shouldn't regex have above [button] , [/button] tags? also, there other efficient way go this? th...

How to Licensing RemoteApp in Azure -

How to Licensing RemoteApp in Azure - we need utilize our erp saas (software service). tried azure trial 3 months, , technically succes. but, when utilize remoteapp services, scheme asked licenses (after 90 days), don't know if possible paying monthly or how obtain licenses. we have great business opportunity, tried contact microsfot back upwards in republic of guatemala (central america), , offered responses in 48 hrs. after month haven't received response. no. ticket 130109017590. can help me explain how licensing works in azure? i think asking licensing in azure. if talking else please allow me know. azure set pay go model initial monthly bill $0 , goes there based on how many resources use. resources in case can computing hours (i.e. have bundle deployed cloud service via web or worker role) most of functionality in azure falls under platform service, details of networking, hardware, os, etc. handled , focus on building , deploying applicatio...

android - EditText looses focus when keyboard appears; requires touching twice to edit -

android - EditText looses focus when keyboard appears; requires touching twice to edit - i have been designing application holds expandable list. @ end of every list, empty edittext ready receive comments. have next problem; when touch edittext , screen resizes (not problem resizing not happen, depending on layout , position of edittext int list) , soft-keyboard appears. however, during these events, edittext looses focus , not regain it. quite inconvenient without focus, despite keyboard beingness available, input keyboard not reach edittext . 1 time touch again, edittext behaves expected. it gets stranger. keyboard still displayed, can touch different edittext , same happens; looses focus. however, 1 time passed initial loss of focus, can move freely between touched edittext s without focus related issues. when hide soft-keyboard "state" disappear , need tap edittext s twice before beingness able edit them. here excerpts code. first, empty_comment.xml : ...

c# - WPF - How can I access to elements in different tabs that are defined in separated XAMLs? -

c# - WPF - How can I access to elements in different tabs that are defined in separated XAMLs? - well, situation this: have wpf project contains tabcontrol 2 tabitems. 1 tab contains textblock, , other 1 has textbox , button. want accomplish when pressing button, text within textbox of sec tab appears in textblock of first tab. it should easy duty, i'm stuck because have each tab designed in separated xaml (and need maintain way), , have mainwindow.xaml: <window x:class="tabsusercontrol.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:tabsusercontrol" x:name="root" title="mainwindow" height="350" width="525"> <grid> <tabcontrol name="tabctrl" horizontalalignment="left" height="210" verticalalignment="top...

coldfusion - isNumeric('100e00') returns yes while lsisnumeric('100e00') returns no -

coldfusion - isNumeric('100e00') returns yes while lsisnumeric('100e00') returns no - i've seen isnumeric('100e00') returns yes while lsisnumeric('100e00') returns no . i've checked hex digits (a,b,c,d) returns no them. does know why considered 100e00 numeric value? 100e00 scientific notation, ie: 100 * 10^0, or: 100. <cfset string = "100e00"> <cfset numeric = val(string)> <cfoutput> values:<br /> string: #string#<br /> numeric: #numeric#<br /> <hr /> isnumeric()<br /> string: #isnumeric(string)#<br /> numeric: #isnumeric(numeric)#<br /> <hr /> lsisnumeric()<br /> string: #lsisnumeric(string)#<br /> numeric: #lsisnumeric(numeric)#<br /> </cfoutput> this outputs: values: string: 100e00 numeric: 100 isnumeric() string: yes numeric: yes lsisnumeric() string: no numeric: yes the functionality of isnumeric() , lsisnumer...

store objects in vector, which is inside a map in C++ -

store objects in vector, which is inside a map in C++ - i trying create map contains string key , vector of myclass. std::map<string,vector<myclass>> m; i need populate vector , map dynamically (reading values file). class myclass{ string datamember1; ... myclass() { ... } }; how should proceed it?? also want able access objects in vector based on string key. for example: std::map<string,vconnect>::iterator pos; pos = mapgraph.find(string); cout<<(pos->second)[0]->datamemberofmyclass will (pos->second)[0] indicate first myclass object stored in vector?? thanks generally, when mapped type container, using [] everywhere works well; if entry isn't present, created empty container, things like: m[key].push_back( newelement ); or m[key].begin(), m[key].end() or even: if ( !m[key].empty() ) dosomethingwith( m[key].second[0] ); work correctly. if you're doing number of operations on same...

convert foreach to Parallel.ForEach c# -

convert foreach to Parallel.ForEach c# - how convert: foreach ( notifycollectionchangedeventhandler handler in delegates) { ... } to somthing this parallel.foreach( notifycollectionchangedeventhandler handler in delegates) { ... } you can do: parallel.foreach(delegates, handler => { //your stuff }); consider next example list<string> list = new list<string>() { "abc", "def", "efg" }; parallel.foreach(list, str => { console.writeline(str); }); you may see: how to: write simple parallel.foreach loop c# task-parallel-library

httprequest - Configuring lifetime scopes in autofac when used as ServiceStack's IoC -

httprequest - Configuring lifetime scopes in autofac when used as ServiceStack's IoC - i'm using autofac di container our servicestack web services app. i'm able configure wiring , everything, after reading section on scopes, i'm @ loss @ scope best utilize when registering components. in our particular case, think perhttprequest scope ok since (please right me if im wrong) want dispose dependencies request ends. my question is, how set in container? can't seem find "perhttprequest" lifetime scope within included methods in autofac. i'm unsure if servicestack kind of automagic me behind scenes. i'm using autofac 3.0.1 on servicestack 3.9.35 on .net 4 (running regular asp host, not mvc). i'm using class described here icontainer adapter. i think have figured out how create work (using autofac 2.6, stuck on right now.) involves using next adapter , autofac.mvc3 package: public class autofaciocadapter : icontaineradapter { ...

Go: error on import in hello world -

Go: error on import in hello world - my test programme test.go : package main import "fmt" func main() { fmt.printf("hello\n") } running go run test.go finishes errors: # io pack: cannot open $work/io/_obj/_go_.6 # strconv pack: cannot open $work/strconv/_obj/_go_.6 environment: go version devel +715674f61ae8 tue jan 29 13:34:18 2013 -0800 linux/amd64 goarch="amd64" gobin="" gochar="6" goexe="" gogccflags="-g -o2 -fpic -m64 -pthread" gohostarch="amd64" gohostos="linux" goos="linux" gopath="/usr/local/google/home/igord/incub/web" goroot="/opt/go" gotooldir="/opt/go/pkg/tool/linux_amd64" cgo_enabled="1" but downloaded version (featured) release 1.0.3 on go site! resolved various in comments, record: installing binary distribution of go location other default requires setting $goroot , $gopath correctly. gettin...

cakephp 2.0 - can anyone tell me difference between Twitter Bootstap and Bootmetro? -

cakephp 2.0 - can anyone tell me difference between Twitter Bootstap and Bootmetro? - i working in cakephp framework , familiar twitter-bootstrap , heard new word bootsmetro similar .can explain me both concepts? boot metro windows 8 style web frame work . its build on top of bootstrap extensive back upwards windows 8 app store . for more extensive info - bootmetro twitter-bootstrap cakephp-2.0

ruby on rails - Why is the semantic_nested_form_for method missing in my production environment? -

ruby on rails - Why is the semantic_nested_form_for method missing in my production environment? - i'm trying switch site utilize nested_form gem in combination formtastic, i'm using, i'm getting unusual error. works fine in development, , tests pass. error occurs in production. visiting page semantic_nested_form_for used causes next error: actionview::template::error (undefined method `semantic_nested_form_for' #<#<class:0x0000000524cca0>:0x00000004e46a70>): 1: <%= semantic_nested_form_for(@volume) |f| %> 2: <%= f.inputs %> 3: <%= f.input :number, :label => 'volume #', :input_html => {:style => 'width:100px;', :autofocus => true}, :hint => raw('choose volume number.') %> 4: <% end %> app/views/volumes/_form.html.erb:1:in `_app_views_volumes__form_html_erb__2632693694855646779_43838320' app/views/volumes/new.html.erb:3:in `_app_views_volumes_new_html_...

c# - System.Timers.Timer enabled and GarbageCollector -

c# - System.Timers.Timer enabled and GarbageCollector - in project created system.timers.timer object , interval set 10 min. every 10 min getting elapsed event. in event handler executing code. before executing code setting enabled property equal false because if handler takes longer execute next interval thread executes elapsed event. problem here elapsed event stopped. i have read articles , suspecting moment enabled property set false garbagecollector frees timer object. if right please tell me solution. below illustration code: public class timer1 { private static system.timers.timer atimer; public static void main() { // create timer 10 sec interval. atimer = new system.timers.timer(10000); // hook elapsed event timer. atimer.elapsed += new elapsedeventhandler(ontimedevent); // set interval 10min. atimer.interval = 600000; atimer.enabled = true; console.writeline("press c...

Targeting a single HTML element with CSS in Drupal 7 -

Targeting a single HTML element with CSS in Drupal 7 - i re-style page title (h1) on 1 particular page (node) of drupal 7 site. best way of targeting single html element css on particular page? obviously, want page title on other pages unaffected. i using sub-theme of bartik, if create difference. normally in of themes classes added body tag. unless using themes mothership can forcefulness remove such classes, these can pretty much handy. mothership provides settings enable/disable populating of body tag such classes. use inspect element in chrome or firebug in firefox or developer toolbar in ie class represent <content_type>-<entity-type>-<id> in <body> tag in page want theme. illustration page-node-12 an illustration output omega theme below <body class="html not-front logged-in page-node page-node- page-node-8 node-type-page context-page admin-menu coffee-processed omega-mediaqueries-processed alpha-debug-processed respons...

Tor with Python: Actively Refusing Connection -

Tor with Python: Actively Refusing Connection - i'm trying interface tor using python, keeps refusing connection. here code: from torctl import torctl conn = torctl.connect(controladdr="127.0.0.1", controlport=9051, passphrase="123") i've tried: from torctl import torctl conn = torctl.connect() both yield next error: failed found socket: [errno 10061] no connection made because target machine actively refused it. any ideas why happening/how might prepare it? hmmm, first i've seen particular error. first guess local firewall, seek running 'telnet localhost 9051' troubleshoot. on side note torctl has been deprecated in favour of stem. python tor

python 2.7 - Who generates the default page of django welcome page? -

python 2.7 - Who generates the default page of django welcome page? - i set django environment , tutorial said. typed python manager.py runserver , told me open 127.0.0.1:8000 . when open it, worked right welcome page. but here question: generates default welcome page? since there no views.py , urls.py page empty. take @ django/core/handlers/base.py , django/views/debug.py . in nutshell, if django gets 404, if don't have routes set up, in base.py if settings.debug: django.views import debug response = debug.technical_404_response(request, e) and in debug.py @ technical_404_response , empty_urlconf django python-2.7

jquery - how to put label tooltip on Flot Chart -

jquery - how to put label tooltip on Flot Chart - hi trying set tooltip on flot chart, below code can body tell me problem. class="lang-html prettyprint-override"> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>untitled page</title> </head> <body> <!--[if lte ie 8]><script language="javascript" type="text/javascript" src="excanvas.min.js"></script><![endif]--> <script language="javascript" type="text/javascript" src="jquery.js"></script> <script language="javascript" type="text/javascript" src="jquery.flot.js"></script> <script language="javascript" type="text/javascript" src="jquery.flot.stac...

Place child over parent with z-index via jQuery -

Place child over parent with z-index via jQuery - i have situation want place kid item over it's parent, somehow seems impossible. quick situation check, see example http://jsfiddle.net/mr3bh/ when hover parent, assumed re-defined kid css settings (remove element parent, remove parent>child relation) via line $('#e11').fadein().css({position:'absolute',left:'50px',bottom:0,zindex:15}); as can seen in jsfiddle example, want element #e11 hover above #e1 , #e2 elements. does know solution or workaround? the behaviour of z-index css property not easy grasp @ first, since there several rules involved - in case changing z-index not enought since each of absolutely positioned div element z-index property creates new stacking context, sort of "layer", , z-index of contained elements valid in same stacking context. a pair of articles provide more insight on matter: http://www.vanseodesign.com/css/css-stack-z-index/ https...

c# - WinApp failing after publishing on Security.Permission.FileIOPermission -

c# - WinApp failing after publishing on Security.Permission.FileIOPermission - i don't understand problem. running winapp visual studio or if start app locally, works charm, publish it, error. string special = environment.getfolderpath(environment.specialfolder.localapplicationdata); the stack trace this: an error window poping up error on "system.security.permission.fileiopermission, mscorlib, version=2.0.0.0, culture=neutral. stacktrace: system.security.securityexception: fehler bei der anforderung des berechtigungstyps "system.security.permissions.fileiopermission, mscorlib, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089". bei system.security.codeaccesssecurityengine.check(object demand, stackcrawlmark& stackmark, boolean ispermset) bei system.security.codeaccesspermission.demand() bei system.environment.getfolderpath(specialfolder folder) (...) is there missing, permission configuration? using .net 3.5, x86 ...

ios - networking works on simulator does not work on iPhone device -

ios - networking works on simulator does not work on iPhone device - this code works flawlessly on simulator, writes out file. on iphone however, not write file out. dlog(@""); timestart = [nsdate date]; nsurl *url = [nsurl urlwithstring:sat_url]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; afhttprequestoperation *operation = [[afhttprequestoperation alloc] initwithrequest:request]; nsstring *path = [[[nsbundle mainbundle] resourcepath] stringbyappendingpathcomponent:file_name]; operation.outputstream = [nsoutputstream outputstreamtofileatpath:path append:no]; [operation setcompletionblockwithsuccess:^(afhttprequestoperation *operation, id responseobject) { dlog(@"updated words to: %@",path); //dlog(@"response: %@",responseobject); [self processwords]; } failure:^(afhttprequestoperation *operation, nserror *error) { // deal failure }]; [operation start]; rawwords , lines null on device: nsstring *p...

Getting error while trying to display image(blob object) in jsp (Spring and Hibernate with Oracle Database) -

Getting error while trying to display image(blob object) in jsp (Spring and Hibernate with Oracle Database) - this problem oracle 10g database. same code working fine mysql database. my model class package com.killerlinks.model; import java.io.serializable; import java.sql.blob; import javax.persistence.column; import javax.persistence.entity; import javax.persistence.generatedvalue; import javax.persistence.generationtype; import javax.persistence.id; import javax.persistence.lob; import javax.persistence.table; @entity @table(name="links") public class linkform implements serializable { /** * */ private static final long serialversionuid = 1l; @id @generatedvalue(strategy=generationtype.auto) @column(name="id") private long id; @column(name="tittle") private string tittle; @column(name="xdesc...

Rails nil errors - any way to stop them? -

Rails nil errors - any way to stop them? - i've been learning rails past 6 months. think it's great! but, 99% of errors app gets nil errors. i'm either trying display field nil or foreign key pointing record has been deleted. i have type of code in many places: <% if location.parent != nil %> <td><%= location.parent.name %></td> <% else %> <td></td> <% end %> <% if location.client_id != nil %> <td><%= location.client.client_name %></td> <% else %> <td></td> <% end %> i wish rails show blank when field nil! or, set flash error , still show page. instead, page bombs. on heroku, "sorry, somethings wrong...." is there way improve handle blank fields? there improve way code above? there rails setting i'm not aware of? there gem handle these type of errors? you...

c# - Read attribute/value pairs from XML file using Linq -

c# - Read attribute/value pairs from XML file using Linq - i have xml file looks this: <?xml version="1.0" encoding="utf-8"?> <response uri="/crm/private/xml/leads/getrecords"> <leads> <row no="1"> <fl val="leadid">2000000022020</fl> <fl val="smownerid">2000000018005</fl> <fl val="lead owner">john</fl> <fl val="company">zillium</fl> <fl val="first name">scott</fl> <fl val="last name">james</fl> <fl val="designation">null</fl> <fl val="email">null</fl> <fl val="phone">null</fl> <fl val="fax">null</fl> <fl val="mobile">null</fl> <fl val="website">nu...

does javascript functions are shared across all objects? -

does javascript functions are shared across all objects? - so code ob1 = { m: function(){ alert(this); } } ob2.m = ob1.m; and because think functions stored 1 time in memory in case yes, code, both ob1 , ob2 have reference same function m . if phone call ob1.m() , phone call m this referring ob1 . if phone call obj2.m() , phone call m this referring ob2 . there one re-create of function, , have multiple references function. in javascript, functions real objects, other object. (this not true of many other programming languages.) you can this: function m() { } var ob1 = {m: m}; var ob2 = {m: m}; again share function. or this: function myobject() { } myobject.prototype.m = function() { }; var ob1 = new myobject(); var ob2 = new myobject(); again share function, because both receive myobject.prototype underlying prototype when they're created via new myobject , , prototype has reference function. similarly (in es5-enabled envir...

wicket autolink in CSS -

wicket autolink in CSS - i have next line within section of panel: .divider{ background-image: url("img/pspacer.png"); } with .png placed relative panel java/html sources wicket autolink enabled , works other resources, such .js , .css files. url within css declaration unmodified wicket , of course of study results in error when requested form browser. java.lang.classnotfoundexception: img the error changes 404 error if there no collision static resources. yet original problem remains, autolinker not alter reference. css wicket autolink

android - LazyLoading of images in a ListView -

android - LazyLoading of images in a ListView - i followed reply stackoverflow: how do lazy load of images in listview and same github: https://github.com/thest1/lazylist where in lastly line of basic usage , says: please create 1 instance of imageloader , reuse around application. way image caching much more efficient. how can this? i have lot of listview(10-15) , far using way in adapter class, given in example: public imageloader imageloader; public lazyadapter(activity a, string[] d) { activity = a; data=d; inflater = (layoutinflater)activity.getsystemservice(context.layout_inflater_service); imageloader=new imageloader(activity.getapplicationcontext()); } i tried doing this: create static variable in first class, , utilize everywhere else: class first{ public static imageloader imageloader; } class lazyadapter{ first.imageloader = new imageloader(activity.getapplicationcontext()); //use } but isn...

c# - How do I sign a PDF document using a certificate from the Windows Cert Store? -

c# - How do I sign a PDF document using a certificate from the Windows Cert Store? - i need sign pdf document using certificate exists in windows certificate store. have been digging around day trying figure out, , so close yet so far away. all missing this: how iexternalsignature object sign pdf file with? rahul singla has written beautiful illustration of how sign pdf document using new itext 5.3.0 api - as long as can access .pfx file sitting around on pc somewhere. there a previous question on signing using certificate windows cert store, except using version of api setcrypto still exists, , signature apparently optional. in itext 5.3.0, api has changed, , setcrypto no longer thing. here's have far (comments added posterity, since might finish , recent version of how on 'net): class="lang-cs prettyprint-override"> using itextsharp.text.pdf; using itextsharp.text.pdf.security; using bcx509 = org.bouncycastle.x509; using org.bouncycastle.pkcs...

How to make a JIRA Number Field read-only? -

How to make a JIRA Number Field read-only? - as described in title, looking smart, safe , efficient way set number field in jira read-only. below short list of approaches, guides , plugins used in effort accomplish this. installed , deployed behaviours plugin this resulted in form permission errors on jira setting of basic , editable fields non-writeable. farther investigation revealed known issue not fixed anytime soon. i have gone , downwards options jira's existing field behaviour , not offer alternative set field read-only. hiding not option, field needs visible (more below). a potential alternative create new screen scheme excludes field edit screen. associating new screen schemes our current project little disaster many other projects dependent , shared. hence making field read-only or admin-writeable-only much improve solution in instance. regarding custom field: created post function in workflow of our current project increment custom number field...

c# - Is there an equivalent of AppDomain.AssemblyResolve in windows store apps? -

c# - Is there an equivalent of AppDomain.AssemblyResolve in windows store apps? - i want attach appdomain.assemblyresolve event in "windows store" app. appdomain doesn't exist. is there alternative way same functionality? the concept of dlls laying around in unpredictable places iffy one. sure, assemblyresolve can deal accidents happen time. , without uncertainty 1 of worst kind, dll hell usability nightmare gives victim no decent shot @ getting problem fixed. winrt designed eliminate such kind of chronic windows usability problems @ core. windows store app must packaged, of executable files app needs must shipped in single downloadable file store. never makes sense seek find dll @ runtime, part of bundle , found in predictable location. accordingly, assemblyresolve event removed reference assembly, no longer serves purpose. c# .net windows-store-apps appdomain .net-assembly

osx - How can I maintain an Airplay connection? -

osx - How can I maintain an Airplay connection? - i'm working on mac mini home automation server i'm trying send text-to-speech messages airport express connected airplay speaker. my problem can't maintain connection airplay speaker. i've tried running applescript @ intervals problem persists: tell application "airfoil" connect every speaker end tell even airfoil seems lose connection after hr or so. how can forcefulness constant airplay connection? osx applescript osx-mountain-lion airplay

android - Pass Bitmap and more information to PHP Server and get using $_FILES[] -

android - Pass Bitmap and more information to PHP Server and get using $_FILES[] - i need upload taken photo php server, don't know how pass image (bitmap) , other informations, name , login, , them @ server side using $_files[]. thank in advance. $target = "folder_name/"; $target = $target . basename( $_files['uploaded']['name']) ; $ok=1; echo "<pre>"; print_r($_files);echo "</pre>"; echo $target."<br>"; $uploaded_size=$_files['uploaded']['size']; $uploaded_type=$_files['uploaded']['type']; //this our size status if ($uploaded_size > 350000) { echo "your file large.<br>"; $ok=0; } //this our limit file type status if ($uploaded_type !="image/bmp") { echo "no php files<br>"; $ok=0; } //here check $ok not set 0 error if ($ok==0) { echo "sorry file not uploaded"; ...

mysql - how to run php script from batch file -

mysql - how to run php script from batch file - i have used article php script named upload_.php , have developed windows service in c# running fine. in theory service run every hr , execute batch file (task.bat). if run upload_php file straight works fine think problem in task.bat file. here code task.bat code @echo off cd\ set path=c:\xampp\php; cd "c:\xampp\htdocs" php import.php exit when service runs execute task.bat file php script dont execute. wrong code???? this worked me although im not php developer colleague helped me @echo off "d:\xampp\php\php.exe" d:\xampp\htdocs\upload_.php %* php mysql batch-file windows-services

c# - Trying to make calculated properties play nice with Entity Framework -

c# - Trying to make calculated properties play nice with Entity Framework - here's simplified version of classes i'm working with: public class parent { public int id { get; set; } public list<child> children { get; set; } public int childrensum { { homecoming children.sum(c => c.value); } } } public class kid { public int id { get; set; } public int value { get; set; } public parent parent { get; set; } } public class testdbcontext : dbcontext { public dbset<parent> parents { get; set; } public dbset<child> children { get; set; } protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.entity<child>().hasrequired(e => e.parent); modelbuilder.entity<parent>().hasmany(e => e.children); } } public class testdbcontextinitializer : dropcreatedatabasealways<testdbcontext> { protected override void seed(testdbcontext context) { ...

ios6 - Passbook pkpass files are not detected -

ios6 - Passbook pkpass files are not detected - i have book itinerary , travel website delivered ticket along pkpassfiles. unfortunately neither safari nor chrome detects , show alternative open in passbook application. shows options fileapp/chm reader etc. how solve this? i utilize default gmail ios app/safari opening opening mails (it's gmail server) as petesh menions, server not serving file mime type of application/vnd.apple.pkpass . if using apache, seek adding next .htaccess file or server .conf addtype application/vnd.apple.pkpass .pkpass if generating .pkpass files manually, can set content header when serving file. e.g. php can use: header('content-type: application/vnd.apple.pkpass'); ios6 passbook