Posts

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...