Posts

Showing posts from January, 2014

ionic - 3g connection no call control when navigate between views angularjs -

i 'm creating mobile application using angularjs , ionic . one of parts of application create list of items calling rest api. if testing application desktop computer or mobile using wifi , works , list refreshes . however, if mobile prove same using 3g connection, drivers not called when navigate between views, , list not refreshed , showing previous value. can me out?

ms access - VBA code works in Access97 but not 2010 -

the 1st record in open order table matches record in bookings table no match = true happening , therefore goes down thru code anf tries insert new record. true several records in file , tries add record though there match. if set no match = false else. imported these table access 97 2010 working correctly. appreciated. additional note: while in debug, if hover mouse on .seek "=", tempcust, temppart fields, shows 1st record in table , data in bookings table. not understanding why not matching? sub get_current_info() docmd.setwarnings false dim rstopenord, rstbookings recordset dim tempcust, temppart, tempqty, tempdollars variant set rstopenord = currentdb.openrecordset("open orders", dbopentable) set rstbookings = currentdb.openrecordset("bookings", dbopentable) 'get open orders while not rstopenord.eof rstopenord tempcust = !odcsno temppart = !oditno tempqty = !o

image - Find the most common circle from an array of circles python opencv -

Image
i using opencv image detecting. now, i'm detecting circles in image. it's doing pretty good, i've set detect multiple circles 1 real circle, remove false positives. here sample: in image, have 6-8 circles totally. want circles, 2 circles, common ones. i using opencv circles images. have list of points (x,y) , don't know how make take common one. any suggestions appreciated. i think clustering k-means solution problem described here . depending on number of false positives can experiment parameters, don't have experience typical part of opencv can't make suggestions.

javascript - Ocanvas creation inquiry -

i'm still little fuzzy on ocanvas, i'm new it. know it's not best choice or documented, have potential job depends on me learning it. i wondering ocanvas.create(); should placed. right have function called main(); in html head , html body runs every time body loops. seems ocanvas.create(); works if place in main(); function, creating canvas every time body loops? can explain bit more 'every time body loops'? have settimeout/setinterval/requestanimationframe runs main many times? in case, run ocanvas.create outside of main , access inside main when needed.

Generate Subject Hash of X509Certificate in Java -

i'm trying generate subject hash using java security api , bouncycastle. here's do, when use openssl library: openssl x509 -in /users/sn0wfreezedev/downloads/test.pem -hash this generates short 8 digit hash 1817886a this java code x509certificate cert = certmanager.getcertificate(number, c); messagedigest sha1 = messagedigest.getinstance("sha1"); system.out.println(" subject " + cert.getsubjectdn()); system.out.println(" issuer " + cert.getissuerdn()); sha1.update(cert.getsubjectdn().getname().getbytes()); string hexstring = bytestohex(sha1.digest()); system.out.println(" sha1 " + hexstring); system.out.println(); this generates short 8 digit hash 1817886a there 2 forms of openssl: $ cd openssl-1.0.2-src $ grep -r x509_subject_name_hash * ... crypto/x509/x509.h:unsigned long x509_subject_name_hash(x509 *x); crypto/x509/x509.h:unsigned long x509_subject_name_hash_old(x509 *x); crypto/x509/x509_c

java - Property is already defined error in wsdl2java -

i trying generate proxy classes wsdl2java using cxf, whenever try keep on getting below error: wsdltojava error: http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/grou peditineraryresponse_v1-0-2.xsd [0,0]: property "validatingcarrier" d efined. use <jaxb:property> resolve conflict. http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/groupeditineraryrespon se_v1-0-2.xsd [0,0]: following location relevant above error i tried add binding file wsdl2java.bat got info 1 of url this: <jaxws:bindings wsdllocation="http://webservices.sabre.com/wsdl/sabrexml1.0.00/shopping/bargainfindermaxrq_v1-8-2.wsdl" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:extensionbindingprefixes="xjc" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc&quo

ember.js - Ember CLI path based on server response -

i'm developing substantial ember app, using ember cli, , i'm struggling few aspects of it. what want is: show dropdown list of options when user picks option, post choice backend the response server contains data based on user picked in dropdown. after getting server response want transition new route path ends 1 of values returned server. for example: /path/to/dropdown -- shows dropdown user pick from, posted backend. backend responds with, amongst other data: slug: <stringvalue> this transitions to: /path/to/slug -- slug <stringvalue> so far i've got 1 & 2 above working, can't figure out how make step 3 work. i've tried using serialize function in /path/to/slug route , /path/to/dropdown controller, returns undefined . the ajax call server, based on user's dropdown choice, happens in /path/to/dropdown controller. i've set router as: this.route('options', { path : ':slug' }); would great if

Unable to get regex working -

i have third party application lets me enter regular expression validate user input in text box. need user input data in format c:64gb, f:128gb h:32gb . regex wrote: \b[a-z]{1}[:]?\d*(gb|gb)\b this regex works fine validates first block. if write c:64gb f:128 , marks input valid. not check f:128 makes input invalid. should c:64gb f:128gb . when change regex ^\b[a-z]{1}[:]?\d*(gb|gb)\b$ , allows me enter c:64gb . what doing wrong here? you can use regex: ^(\w*[a-za-z]:?\d+(?:gb|gb)\w*)+$

Adding Subclass to Main Class in JavaScript -

var test = { hoi : { test: function(e) { console.log(e); } }, c: function(e) { console.log(e); } }; test.c("hey 1"); test.hoi.c("hey 2"); i've doing classes exercising, can't find manage put subclasses main class. test.hoi.c doesn't exist; test.hoi.test use: test.hoi.test("hey 2"); each dot digs step deeper structure of object.

css3 - How to make 3 vertical dots using CSS? -

Image
i want have 3 dots on page to, example, toggle display of contextual menu. how can achieve using css? using unicode char .test:after { content: '\2807'; font-size: 100px; } <div class="test"></div> using background property div { width: 100px; height: 300px; background-image: radial-gradient(circle @ center, black 10px, transparent 10px); background-size: 100px 100px; } <div></div> shadow div { width: 30px; height: 30px; border-radius: 50%; background-color: black; box-shadow: 0px 40px 0px black, 0px 80px 0px black; } <div></div> pseudo elements div { position: relative; width: 20px; height: 20px; background-color: black; border-radius: 50%; } div:before, div:after { content: ""; position: absolute; width: 100%; height: 100%; left: 0px; background-color: inherit; borde

c# - Remove Specific Value from DropDown -

i beginner dot.net, can 1 suggest me how remove specific value in fetched dropdown list. here why mentioning fetched means dropdownlist generated or fetched table using sql. sqlquery=select distinct rtrim(ltrim(c.cust_name)) cust_name table1 inner join table2 b on a.cust_code = b.cust_code sqlcommand cmd = new sqlcommand(sqlquery, conn); sqldatareader sr = cmd.executereader(); while (sr.read()) { { cmb_cust.items.add(sr["cust_name"].tostring()); } } foreach (listitem li in cmb_cust.items) { { if (li.value == "value1") cmb_cust.items.remove(li); } } if process above statement facing collection modified enumeration operation may not execute , can other solution swaping list temp list , process operation. don`t need value1 after fetching sql. even better removing item afterwar

elisp - Emacs minor mode programming: cancel toggle-off procedure? -

i programming own emacs minor mode using idioms , macros similar minimal example: (define-minor-mode foo-mode "toggle foo mode." :init-value nil :lighter " foo" :group 'foo (if foo-mode (do-enable-foo) (do-disable-foo)) ) (defun do-enable-foo () "enable foo minor mode" (message "enabling foo...") (if test-something (message "foo enabled after disabling canceled!") (message "foo enabled scratch")) ) (defun do-disable-foo () "disable foo minor mode" (message "disabling foo...") (if (not certain-situation) (message "... done.") ; finish disabling foo ;; else forms: (message "need cancel disabling foo!") (foo-mode 1)) ; turning foo mode on again ) during toggling off of minor mode, 'certain-situation may arise when have cancel toggling off. currently, thinking since using define-minor-mode macro, cannot ba

c# - Make camera follow that can fly around a sphere at a constant height and speed -

Image
i need make script can make maincamera fly around sphere @ constant height , speed. need write in c# , i'm kinda new that, need help. so far have wrote script orbits around object, want control camera wasd. this orbit-script far public class cameraorbit : monobehaviour { public gameobject target = null; public bool orbity = false; void start () { } void update () { if (target != null) { transform.lookat(target.transform); if(orbity) { transform.rotatearound(target.transform.position, vector3.up, time.deltatime * 10); } } } } you have 2 options how this: option #1 way started option #2: instead of rotating camera around sphere center, can make camera child node of node in sphere center , change euler angles of parent node: using unityengine; public class rotatechild : monobehaviour { void update() { if( input.getkey( key

Single keymap to Preview in browser in PhpStorm -

Image
is possible configure single hit key preview in browser in phpstorm? the key map preview in browser works fine, don't select default browser , show choose browser dialog. settings (preferences on mac) | appearance & behavior | keymap locate other | open in default browser action (you may use search box -- faster) assign custom shortcut

php - How to delete a certain object from your list in Laravel? -

Image
i have subscribers table : when click on delete btn bring modal confirm : i'm close, when hit delete, keep delete last 1 on list if i'm not pressing last delete btn. i know have use {!! form::hidden('$id', $subscribe->id)!!} somewhere, i'm not sure should place it. table <?php $x = 0; ?> <div class="container"> <div class="row"> <a href="subscribe/create" class="btn btn-sm btn-success "> <span class="fa fa-plus"></span> create </a><br><br> <table class="table"> {{--table header--}} <thead class="thin-border-bottom"> <th width="50" >#</th> <th width="200" >email</th> <th width="100" >subscribe on </th> <th width="100"

html - Opacity only on ul not on li css -

this question has answer here: how give text or image transparent background using css? 25 answers i have list height of 300px , want background have opacity. list items have stay same (opacity 1). how can this? code: html: <div class="dropdown"> <span class="notif">2</span> <ul class="dropdown-menu"> <li><a href="#"><span>elisadehasque</span> liked story in <span>disneyland paris</span><span class="done">x</span></a></li> <li><a href="#"><span>petyana</span> started following you<span class="done">x</span></a></li> </ul> </div>

image processing - OpenCV Histogram Comparison Methods -

looking @ histogram documentation , there 4(5) different comparison methods: cv_comp_correl correlation cv_comp_chisqr chi-square cv_comp_intersect intersection cv_comp_bhattacharyya bhattacharyya distance cv_comp_hellinger synonym for cv_comp_bhattacharyya they give different outputs read differently shown in compare histogram documentation . can't find states how each method performs compared against each other. surely there pros , cons each method, otherwise why have multiple methods? even opencv 2 computer vision application programming cookbook has little on differnces: the call cv::comparehist straightforward. input 2 histograms , function returns measured distance. specific measurement method want use specified using flag. in imagecomparator class, intersection method used (with flag cv_comp_intersect) . method compares, each bin, 2 values in each histogram, , keeps minimum one. similarity measure sum of these minimum values. consequ

java - Coordinates not corresponding -

i'm pretty new android , i'm struggling trying understand going on in application. i'm trying build small game in circle appears on screen, in random position , disappears user clicks on it. new circle appears in position. the problem comparing coordinates of user's click, , coordinates of center of circle, these seem totally different… problem seems in circle coordinates, because if try force position center of view, appears in totally wrong position, @ right bottom of view. what doing wrong? this code of function drawing circles in view (which big parent). public void drawdots(){ paint paint = new paint(); paint.setcolor(color.magenta); bitmap bg = bitmap.createbitmap(480, 800, bitmap.config.argb_8888); view ll = (view) findviewbyid(r.id.circle); ll.setbackground(new bitmapdrawable(bg)); centerx = rand.nextint(ll.getwidth()); centery = rand.nextint(ll.getheight()); canvas canvas = new canvas(bg); canvas.drawcircle(c

php - Laravel POST Token missmatch exception (file upload) -

i have piece of functionality creates popup bit of responsiveness (this works), have html code popup box (it's using jquery dialog show popup form between other html code, surrounded div makes invisible): <form id="logform" method="post"> <select id='logoption'> <option value="0"> select logtype </option> <?php //sql in laravel style log types database $logtypes = db::table('time_log_types')->get(); foreach ($logtypes $logtype) { echo ' <option value="'. $logtype->id . '">' . $logtype->logtype.'</option>'; } ?> </select> <div id="illness" style="display:none"> <p>end date: <input type="text" id="enddate"></p> <p>doctor's note: <input type="file" id="doctorsnote"></p> </div>

c# - Remove attributes like width inside a style element -

i need remove width inside of style element, pref using html agility pack. i tried using: public static void removestyleattributes(this htmldocument html) { var elementswithstyleattribute = html.documentnode.selectnodes("//@style"); if (elementswithstyleattribute!=null) { foreach (var element in elementswithstyleattribute) { element.attributes["style"].remove(); } } } but have been unable target single element inside of style (since not want remove style entirely)

how to return to fragment in android fragmentTabHost -

Image
i have paint problem: do know solution? start activityb activitya using startactivityforresult . int request_code = 99; // random number here startactivityforresult(activityaintent, request_code); 1) in activityb call: setresult(result_ok); finish(); 2) in activitya catch result_ok activityb : @override protected void onactivityresult(int requestcode, int resultcode, intent data) { // check request we're responding if (requestcode == request_code) { // make sure request successful if (resultcode == result_ok) { // finish activitya , navigate fragmenta setresult(result_ok); finish(); } } } other solution if don't need activitya after start activityb , call finish() in activitya start activityb . having can call finish() in activityb , user navigated fragmenta expected.

statistics - Is is possible to real time update a value with spark streaming? -

lets assume have stream of double values , want compute average every ten seconds. how can have sliding window doesn't need recompute average instead update by, lets say, removing part of oldest ten seconds , adding new 10 seconds values? tl;dr : use reducebywindow both of function arguments (jump last paragraph code snippet) there's 2 interpretations of question, specific 1 (how running mean 1 hour, updated every 2 seconds), , general 1 (how computation updates state in sparse way). here's answer general one. first, notice there way represent data such average-with-updates easy compute, based on windowed dstream : represents data incremental construction of stream, maximal sharing. less efficient, computationally, recompute mean on each batch – noted. if want update of complex stateful computation invertible, don't want touch stream's construction, there updatestatebykey – there spark doesn't in reflecting incremental aspect of computation

java - Unable to connect to Openfire server (using smack api) -

i trying run code using smack 4.1.0 thread d= new thread(new runnable() { @override public void run() { smackconfiguration.setdefaultpacketreplytimeout(10000); xmpptcpconnectionconfiguration config = xmpptcpconnectionconfiguration.builder() .setusernameandpassword("harsh", "pass") .setservicename("192.168.0.200") .sethost("192.168.0.200") .setport(5223).setsecuritymode(connectionconfiguration.securitymode.ifpossible) .build(); abstractxmppconnection conn2 = new xmpptcpconnection(config); try { conn2.connect(); conn2.login(); presence presence = new presence(presence.type.unavailable); presence.setstatus("gone fishing"); //

pentaho - MySQL - Calculate % from two tables using sub-querys -

i'm new this, had no training @ , didn't cover in uni. bare me. it's simple query pulls data, counts number of results , displays total user. using sub-queries , pulling 2 different tables these results. select count(trans_station), trans_station cuesheet_tx_dates trans_station = "his" , txdate between "15-01-01" , "15-01-31" ^this returns data within date , channel code select count(*) hisr cuesheet_tx_dates td inner join cuesheets s on td.cuesheets_id = s.id td.txdate between '2015-01-01' , '2015-01-31' , td.trans_station = 'his' , s.status = 'c'; ^this returns completed data within date , channel code i need know how calculate percentage of completed data against data. using pentaho report designer ce, mysql db, appreciated. you can create formula result of query using "singlevaluequery" function. example, let's create for

javascript - Why I obtain this error message when from a dialog I try to perform a function defined into the parent page using parent.rifiutaSingolo()? -

i have following problem trying perform javascript function dialog defined parent page opened dialog. so have situation: i have parent page page named autorizzafattura2 page open dialog (when user click on link dialog opened) javascript: function opendialog2(pagina,larghezza,lunghezza,tipo) { //alert("into opendialog2(), pagina: " + pagina, " larghezza: " + larghezza + " lunghezza: " + lunghezza + " tipo: " + tipo); larghezza = '950px'; lunghezza = '470px'; lunghezza2 = '530px'; if (tipo == 3) { larghezza = '950px'; lunghezza = '470px'; lunghezza2 = '530px'; } if (tipo == 9) { larghezza = '950px'; lunghezza = '470px'; lunghezza2 = '530px'; } unitalargo = larghezza.substring(larghezza.length - 2, larghezza.length) unitalungo = lunghezza.substring(lunghezza.length - 2, lunghezza.length) var puntilarghezza = 0;

node.js - Loopback REST findById doesn't work well -

i'd use findbyid function through rest api. defined "id" string constructed number. i try find id, system seems recognize number. can't use when id big number on "9007199254740992" - max number of integer. i'd use id string. please tell me how solve problem. thank you, --follow up-- my program follow. model - sample-model.json { "name": "samplemodel", "base": "persistedmodel", "idinjection": true, "properties": { "id": { "type": "string", "id": "true", "required": true, "doc": "model id" }, "prop1": { "type": "string", "required": true } }, "validations": [], "relations": {}, "acls": [], "methods": [] } when access findbyid function through rest

r - How can I install packages from an SVN server in RStudio? -

i check out 2 folders (downloaded folders) svn server, requires username , password. after giving username + password + address of server, name of folders, how can it? there command or packages purpose? not want create project , use rstudio versions controller editor! want download these folders server.

php - List all tables in cakePHP 3.x -

i have been trying work 1 out. in cakephp 2 use: $tables = connectionmanager::getdatasource('default')->listsources(); but in cakephp 3.x can't work out use? have looked @ link cakephp schema list of tables unfortunately doesnt cakephp 3.0? we can list of table in cakephp3 using similar pattern $tables = connectionmanager::get('default')->schemacollection()->listtables();

ios - Implement Pull to Refresh feature in Core Plot -

hi want implement pull refresh feature in cp can reload data using gesture. did research apple built in gesture features rely on tableview or scrollview. possible make use of gesture recognizers have been built in core plot library? or there ready made methods within cp? saw people put cp within scrollview guess make performance worse? you can configure graph bounce if user pulls plot past global plot range (set allowsmomentum yes on plot space). however, doesn't give enough control of bounce pause , display spinner displayed during refresh. you're better off embedding graph in view handles pull-to-refresh action.

android - Do i need a script (php) in the server for syncing json data from the server to andoid app? -

i want android app communicate server (in case, godaddy shared server) , sync data in android app. want send , receive json data, server. do need php script in server, happen? script necessary in server receive request , give respond in json format? yes, if want communicate server,you must written backend programmer deal request jsp php or c# , on

javascript - How can I get the key of my object? -

i have following object: var text = { 'one' : 1, 'two' : 2, 'three' : 3}; i want write key 'one' console.log() . how can it? try: var text = { 'one' : 1, 'two' : 2, 'three' : 3}; (var in text){ console.log(i); }

ios - How to use scope bar with UISearchController -

i able create scope bar uisearchcontroller & set titles resultsearchcontroller = ({ let controller = uisearchcontroller(searchresultscontroller: nil) controller.searchresultsupdater = self controller.dimsbackgroundduringpresentation = false controller.searchbar.showsscopebar = true controller.searchbar.scopebuttontitles = ["one", "two", "three"] controller.searchbar.sizetofit() self.tableview.tableheaderview = controller.searchbar return controller })() but how sort using scope bar. current sorting method follows func updatesearchresultsforsearchcontroller(searchcontroller: uisearchcontroller) { filteredtabledata.removeall(keepcapacity: false) let searchpredicate = nspredicate(format: "self contains[c] %@", searchcontroller.searchbar.text) let array = (tabledata nsarray).filteredarrayusingpredicate(searchpredicate) filteredtabledata

How to determine if the RecurrencePattern in Outlook is end by a date or end by recurrence count -

for finite recurring appointment in outlook, recurrencepattern interface doesn't expose property tell if pattern end date or end recurrence count. patternenddate , endtime , , occurrences properties populated. is there way determine end type of pattern? oom not expose property. can parse recurrence blob (not fainthearted). if using redemption option, use rdorecurrencepattern .patternendkind property (reknoenddate, rekendafteroccurrences, rekendbydate).

javascript - Why the added prototype method should be added after `util.inherits`? -

i want know why added prototype method should added after util.inherits ? var util = require('util'); var eventemitter = require('events').eventemitter; function server() { console.log('init'); } server.prototype.say = function(){ console.log('say'); } util.inherits(server, eventemitter); var server = new server(); server.on('abc', function(){ console.log('abc'); }) server.emit('abc'); server.say(); there error when run code: c:\users\elqstux\desktop\wy.js:19 server.say(); ^ typeerror: undefined not function @ object.<anonymous> (c:\users\elqstux\desktop\wy.js:19:8) @ module._compile (module.js:460:26) @ object.module._extensions..js (module.js:478:10) @ module.load (module.js:355:32) @ function.module._load (module.js:310:12) @ function.module.runmain (module.js:501:10) @ startup (node.js:129:16) @ node.js:814:3 but if modified code this: util.inherits(s

gcc - "Error: unsupported relocation against <register>" error with inline PPC assembly code in .c file -

i have below inline assembly code. when try compile it, throws error mentioned after code snippet. unsigned int func(void) { __asm__ ("mfspr r3, svr;"); } below errors. {standard input}: assembler messages: {standard input}:3349: error: unsupported relocation against r3 {standard input}:3349: error: unsupported relocation against svr {standard input}:3375: error: unsupported relocation against r3 {standard input}:3375: error: unsupported relocation against svr {standard input}:3510: error: unsupported relocation against r3 {standard input}:3510: error: unsupported relocation against svr {standard input}:3517: error: unsupported relocation against r3 {standard input}:3517: error: unsupported relocation against svr can me fixing these? apparently gas has no built-in support these registers. in order use should either define them or use indexes explicitly like: mfspr 3, <some_index_here> alternatively include: ppc_asm.tmpl . if core e500 svr i

ios - What is a good approach to pass data through containment view controllers -

Image
i trying pass instance of object "initial" view controller "item1" , "item2". avoid subclassing uitabbarcontroller make containment view controller know "too much". is there approach using storyboards or code besides subclassing uitabbarcontroller ? i avoid subclassing uitabbarcontroller make containment view controller know "too much". you should subclass, , subclass should implement specific protocol purpose. yhen, containing vc knows protocol , it's appropriate because has direct responsibility.

osx - How to batch move folders up one sub-directory on Mac? -

i have large music library (>20000 songs) trying move mac pc. individual files comprise library collected on mac on long period of time. extracted compressed archives, e.g. .zip or .rar. unfortunately, unpacker program used extract these files placed them newly created folder before extraction. because these archives zipped folders, have bunch of files inside nested redundant directories. for example, let's extracted archive named abcdwxyz.zip. this archive compressed version of folder abcdwxyz, inside files track 1, track 2, etc. however, extraction program used first created new folder named abcdwxyz , proceeded extract contents of archive folder, resulting in several thousand pathnames this: itunes/abcdwxyz/abcdwxyz/track 1.mp3 itunes/abcdwxyz/abcdwxyz/track 2.mp3 itunes/abcdwxyz/abcdwxyz/track 3.mp3 itunes/abcdwxyz/abcdwxyz/track 4.mp3 itunes/abcdwxyz/abcdwxyz/track 5.mp3 itunes/qwerty/qwerty/track 1.mp3 itunes/qwerty/qwerty/track 2.mp3 itunes/qwerty/qwerty/track 3

jquery - How to Store More then one data in cookie in Json using Javascript -

Image
what need i need store max of 3 events id in json string. like: { 9,133,34}. next want when 4 th event id insert override 9 event id . , 5th override 133 , on. scenario when user land on page of event id stored in cookie. in json string, , on user browser browser browse next event id gets stored in json string , max limit of 3 events id storing. i have reffer note : howe can save more strings in cookie , place them in list? i have tried like html <input type=hidden id="eventid" value="{{ data.detailes.data.event.event_id }}"> <input type=hidden id="industry_id" value="{{data.detailes.data.industry_id.id}}"> js code var cookie_event_id=document.getelementbyid("eventid").value; alert(cookie_event_id); document.cookie = 'event_id=' + cookie_event_id; var cookie_industry_id=document.getelementbyid("industry_id").value; alert(cookie_event_i

jquery - Responsive Grid Layout Relative to Screen Size -

Image
i have listed design requirements below - i'm working on creating responsive grid layout relative screen size. similar attached image if user resize screen, grids should adjust (both in height , width) occupy screen size. technically grids should occupy entire screen without vertical scroll bars. above condition #2 applicable desktop , tablet devices. other screen grid behave normal responsive layouts (i.e vertical scroll bar display entire content) can please guide me how implement above requirement using jquery plugin or similar. you have define width , height in jquery , in window.resize find fiddle demo here html: <div class="col col30 bgblue"></div> <div class="col col40 bggold"></div> <div class="col col30 bgblack"></div> <div class="col col30 bggreen"></div> <div class="col col30 bgpink"></div> <div class="col col40 bgre

javascript - PHP - Get total of values displayed in table -

Image
i using pre defined php inventory manager. in sales data getting stored way: [{"product_id":"8","total_number":"70","selling_price":"110"}] to display these values in table use following code $sub_total = 0; $invoice_entries = json_decode($row['invoice_entries']); foreach ($invoice_entries $row2): $sub_total += ($row2->total_number * $row2->selling_price); endforeach; $sub_total = $sub_total - ( $sub_total * ($row['discount_percentage'] / 100) ); $grand_total = $sub_total + ( $sub_total * ($row['vat_percentage'] / 100) ); echo $grand_total; i desired output here total value of sale. now, trying give report feature show invoices client name, sale value. want calculate total of invoices , show in table row i.e. total of $grand_total . i unable understand how that. java script it? don't understand js wel

JAVA parser for asana json data "Error:JSONObject cannot be converted to JSONArray" -

i working on java parser parse asana json data. executing request using curl , curl use cygwin tool(used execute unix commands on windows). now getting single project details in json format(that contain tasks in projects) getting 1 task id , use task id single task details. when parse subrequest data(request single task detail). gives me error " jsonobject cannot converted jsonarray ". error line jsonarray dataarray2= (jsonarray)jsonobject2.get("data"); example asana json response many tasks { "data": [ { "id": 23097910271884, "name": "asana prtl rprtng intgrtn r&d" }, { "id": 30483134480109, "name": "curl training" }, { "id": 30483134480115, "name": "database design" }, { "id": 31806291283828, "name": "json parser setup" }, {