Posts

Showing posts from April, 2012

mysql - fetch value into td tag with php and pdo -

with code inside td-tag text "array" showing up. how can real value? <tbody> <tr> <?php $sth = $dbh->prepare("select * customers"); $sth->execute(); $result = $sth->fetchall(); foreach($result $key => $value) { echo "<td>$value</td>"; } ?> </tr> </tbody> foreach($result $key => $value) { echo "<td>{$value['field_name']}</td>"; } here $value array because $result should 2 dimensional array. need call this. echo "<td>{$value['field_name']}</td>"; you can add foreach . foreach($result $key => $inner_arr) { echo '<tr>'; foreach($inner_arr $field_name => $field_value) { echo "<td>{$field_value}</td>"; } echo '</tr>'; }

php pagination getting error (Fatal Error:unspported operand types) -

i got error fatal error: unsupported operand types in line12 while doing pagination in page. please me how solve this <?php require_once("pagination.php"); $page=1;//default page $limit=1;//records per page $start=0;//starts displaying records 0 if(isset($_get['page']) && $_get['page']!=''){ $page=$_get['page']; } $start=($page-1)*$limit; ?> try: $start = (is_numeric($page) ? (int)$page : 0)*limit; how int instead string form?

actionscript 3 - GCM Push Notification adobe air -

i m developing push notification service app in android came tutorials achieve goal. struck 2 things can't figure out. need help. pushnotifications.init( "*dev_ke*y" ); <permission android:name="*application id*.permission.c2d_message" now want know 2 things. dev_key , application id.secondly pushnotifications.init(); necessary call? if call without dev_key param? i'm guessing you're following tutorials on distriqt's site using distriqt cross platform push notifications extension? if dev_key developer key when sign distriqt extension package. necessary call function valid key if hoping use distriqt extensions. if call without dev_key param extension not work documented. the second line have there containing application id used in application descriptor file. need add following manifest additions on android replacing your_application_id references applications id. of form : com.company.name. air prefixes shown these a...

vb.net - VB - Convert long String-number to Integer -

alright, i'm not oriented when comes functions aviable in vb. have string containing current date , time , need convert integer can compare time. dim my_str string = "201308281110" dim my_int integer = convert.toint32(my_str) i cant string apparently. because think long 32-bit integer. other convertions have tried fails. including "toint64", "int", "cint"... so, idea how convert longer string integer? why don't use date ? can compare dates each other, there's no need use integer comparing. dim my_date date = datetime.parseexact(my_str, "yyyymmddhhmm", system.globalization.cultureinfo.invariantculture)

unit testing - Angular Test tutorials on Jasmine website not working -

i started practice tests on angular-seed app based on jasmine. when using first test example found on pivotal.github.io/jasmine/ fails on app. test example code: describe("a suite", function() { it("contains spec expectation", function() { expect(true).tobe(true); }); }); but passes on tryjasmine.com i did test content , views/partials, pass. 1 on jasmine site fails. missing or there config need setup? karma.conf.js file: basepath = '../'; files = [ jasmine, jasmine_adapter, 'app/lib/angular/angular.js', 'app/lib/angular/angular-*.js', 'test/lib/angular/angular-mocks.js', 'app/js/**/*.js', 'test/unit/**/*.js' ]; autowatch = true; browsers = ['chrome']; junitreporter = { outputfile: 'test_out/unit.xml', suite: 'unit' }; karma-e2e.conf.js file: basepath = '../'; files = [ angular_scenario, angular_scenario_adapter, 'test/e2e/**...

java - BufferedReader not taking input even after pressing enter -

public static void main (string args[]) throws ioexception{ bufferedreader br = new bufferedreader(new inputstreamreader(system.in)); system.out.println("enter string"); string s = br.readline(); s=s+" "; s.tolowercase(); string word=""; string max=""; int count=0; for(int i=0; i<s.length();i++){ char ch = s.charat(i); while(ch!=' ') word+=ch; if(word.length()>max.length()){ max=word; count++; } else count++; }system.out.println(max+" , "+count); } } i want find biggest word in string without using split or , count how many words present in sentence. when input , press enter nothing happens. problem? there no problem reading input console. while(ch!=' ') word+=ch; it makes infinite loop. should update while-loop - while(ch!=' '){ word+=ch; ch = s.charat(++i); }

c# - RavenDB Map only index returns null values after AsProjection<T> -

i have next index: public class testindex : abstractindexcreationtask<resource> { public class result { public string caption { get; set; } public string testval{ get; set; } } public testindex() { map = resources => r in resources select new { caption = r.caption, testval = r.caption }; } } and that's how query it: var data = session.query<resource, testindex>() .customize(x => x.waitfornonstaleresults()) .asprojection<testindex.result>() .tolist(); the problem after query testval property null each object, when caption filled expected value. if want projection index, need store value...

javascript - D3 Error: NotFoundError: Node was not found -

i trying dynamic capability of d3 , have followed example given in http://mbostock.github.io/d3/tutorial/bar-2.html working fine when add code x-axis , y-axis getting " notfounderror: node not found " error redraw() function. without code axis draw, working fine otherwise getting " notfounderror: node not found " error redraw() function. let me know issue , how resolve it. -- thanks //data set var t = 17; var data = [ {"time": 1, "value": 56, "color": "green"}, {"time": 2, "value": 53, "color": "green"}, {"time": 3, "value": 58, "color": "green"}, {"time": 4, "value": 58, "color": "green"}, {"time": 5, "value": 56, "color": "green"}, {"time": 6, "value": 53, ...

checking size of Polygon drawn with Leaflet l.draw.polyline -

i've made website leaflet draw polygons on osm-map . now want check size of polygon, because polygon must not exceed defined size, example, 5 square kilometers. does have idea check size of drawn polygon? i have used leaflet.draw ( https://github.com/leaflet/leaflet.draw ) draw polygon. and has geodesicarea function. sample in 'draw:created'. map.on('draw:created', function (e) { var type = e.layertype, layer = e.layer; if (type === 'polygon') { var area = l.geometryutil.geodesicarea(layer.getlatlngs()) ...

android - How the progress bar of Git Hub app is implemented -

when trying implement progress bar. came across git hub application implements fabulous progress bar spinner. curious how it. how calling spinner in app such way other part of activiy ui loads part of activity ie 1 probabalyfetched server shows spinner. since git hubis open source software able browse code. couldnt undrstand much. gihub app source code know how implementing progress bar. it regular progressbar custom style. e.g. https://github.com/github/android/blob/master/app/res/layout/progress_dialog.xml <progressbar android:id="@+id/pb_loading" style="@style/spinner" android:layout_width="48dp" android:layout_height="48dp" /> defines should use spinner style defined as https://github.com/github/android/blob/master/app/res/values/styles.xml <style name="spinner"> <item name="android:indeterminate">true</item> <item name="android:indetermina...

c# - Set Default PageSize of GridView -

i trying override pagesize property of grid view set default value 100, when code executes takes default value defined in base class. can please how can set default pagesize. extending gridview control customize according need. here code : [defaultvalue(100)] public override int pagesize { { return base.pagesize; } set { base.pagesize = value; } } or should try set default page sie in overridden method like. protected override void oninit(eventargs e) { base.pagesize = 100; base.oninit(e); } or protected override void onload(eventargs e) { base.pagesize = 100; base.onload(e); } defaultvalueattribute not meant real default value, vs designer - first method not work. quote msdn: a defaultvalueattribute not cause member automatically initialized attribute's value. must set initial value in code. http://msdn.micro...

java - How to get local mapping of a servlet in its init method? -

i've servlet , it's init method must http calls itself. because i'm using embedded app, starts , it's main interface it's restful api. can't , don't want use internal classes, because not documented , difficult use. prefere use rest api through local http. so, extended servlet comes app , modified init method, starts thread , http calls itself . moment hardwired " http://localhost:port/servlet/mapping/ " path, i'd have dynamic @ least detect port number , mapping too. is there decent way this? found lots of examples extract information httpservletrequest object, in init method don't have it. have servletcontext . ah, way, use servlet api 3.0. in servlets 3 can current mappings given servlet: string servletname = servletconfig.getservletname(); servletregistration reg = servletconfig.getservletcontext().getservletregistration(servletname); for(string mapping: reg.getmappings()) { // mapping } about port number, gi...

python - Printing dynamic django view template -

i'm working on django app. have page displays log of items, , each item has "print label" link. @ moment, clicking link displays label particular item in popup screen, not send label printer. view function behind "print label" link shown below: @login_required def print_label(request, id): s = item.objects.get(pk = id) return render_to_response('templates/label.html', {'s': s}, context_instance=requestcontext(request)) the html label shown below: {% load humanize %} <head> <style type="text/css"> div{ min-width: 350px; max-width: 350px; text-align: center; } body{ font-family: arial; width: 370px; height: 560px; text-align: center; } </style> </head> <body> <div id="labelheader"> <img src="{{ static_url }}img/label-header.png...

php - Unexpected Rewrite -

on localhost, in 1 of folders, files accessible http://localhost/folder/map instead of http://localhost/folder/map.php . it's because of wrong apache's configuration i'm stuck here , nothing comes mind. if have file called index.php or index.html in http://localhost/folder/map folder, apache run file when enter directory name browser url. this makes http://localhost run page rather showing directory listing, or show blank page. this reason see valid page when keying in http://localhost/folder/map url.

javascript - Showing video in its original size -

im pulling video urls database(in db dont have other information video). url can youtube url or url of video hosted somewhere(amazon servers). youtube(user has shared tube video) example: https://www.youtube.com/watch?v=eeqyrzks3hw amazon(user has uploaded video) https://blablabla.s3-external-3.amazonaws.com/video2_1324763440554052-transcoded.mp4 now need play video on page in original size, in other words viewing video on page must same viewing on youtube. same case uploaded video. im using iframe youtube , jwplayer uploaded videos.

jquery display block / none -

hi new jquery 1 me show div , hide dive after trasnsition here script jquery(function($) { $('a.panel').click(function() { var $target = $($(this).attr('href')), $other = $target.siblings('.active'), animin = function () { $target.addclass('active').show().css({ left: -($target.width()) }).animate({ left: 0 }, 300); }; if (!$target.hasclass('active') && $other.length > 0) { $other.each(function(index, self) { var $this = $(this); $this.removeclass('active').animate({ left: -$this.width() }, 300, animin); }); } else if (!$target.hasclass('active')) { animin(); } }); }); if using id div $('#dividhere').attr('display',...

Snmpwalk Linux Bash doesn't return an array -

i running nagios server on opensuse linux linking via snmp esx 3.5 server i trying snmpwalk return array returns single value. on esx box ahve following shell find sizes of of snapshots- /usr/bin/find /vmfs/volumes/ -name '*delta*.vmdk' -printf %f' '%s'\n' this returns following when ran on esx box- [root@localhost root]# /bin/sh /etc/snmp/snmp_snapshots.sh testnag01-000001-delta.vmdk 16840704 testnag01-000002-delta.vmdk 167835648 testnag01-000003-delta.vmdk 151058432 on nagios box have following shell- declare -a result=$(/usr/bin/snmpwalk -v 2c -c public 10.10.0.20 .1.3.6.1.4.1.6876.57.101.2 | grep vmdk | awk {' print $4,$5 '} | sed 's/ /_size:/g' | sed 's/\"//g') echo "snapshot 1" ${result[0]} echo "snapshot 2" ${result[1]} this returns single value, (the second 1 on list)- snapshot 1 testnag01-000002-delta.vmdk:167835648 snapshot 2 when run command on own- /usr/bin/snmpwalk -v 2c -c...

java - How i can i get header from HttpServletResponse? -

list item how can header information httpservletresponse? there method in getheader() note:available servelt 3.0 ,if not can't use this. and this method considers response headers set or added via setheader(java.lang.string, java.lang.string), addheader(java.lang.string, java.lang.string), setdateheader(java.lang.string, long), adddateheader(java.lang.string, long), setintheader(java.lang.string, int), or addintheader(java.lang.string, int), respectively.

dynamic - How to index parts of jsonObject by setting custom mappings in Elasticsearch? -

i have such jsonobject: { "success": true, "type": "message", "body": { "_id": "5215bdd32de81e0c0f000005", "id": "411c79eb-a725-4ad9-9d82-2db54dfc80ee", "type": "metamodel", "title": "testchang", "authorid": "5215bd552de81e0c0f000001", "drawelems": [ { "type": "app.draw.metaelem.modelstartphase", "id": "27re7e35-550j", "x": 60, "y": 50, "width": 50, "height": 50, "title": "problem engagement", "isghost": true, "pointto": "e88e2845-37a4-4c45-a030-d02a3c3e03f9", "bindingid": "90f79d70-0afc-11e3-98d2-83967d2ad9a6", "model": "meta", "entitytype...

database - Python distributed transactions like Java Transaction API (JTA) -

is there solution distributed transactions in python or mysqldb java transaction api (jta)? i got problem when processing data on multiple databases (maybe different kinds of databases). how can ensure data consistency? i know there's java transaction api (jta) in java. how can python? you use sql statements xa transaction. not pretty real api, works. don't know if there tm's (transaction managers) available python, write own. also note in java not required use application server when using xa. example: http://bugs.mysql.com/file.php?id=22190&bug_id=75316 in [1]: import mysql.connector in [2]: c = mysql.connector.connect(host='127.0.0.1',port=5705,user='msandbox',password='msandbox'); in [3]: cur = c.cursor(); in [4]: cur.execute("xa start 'py-xa-001'"); in [5]: cur.execute("insert test.t1 values(1)"); in [6]: cur.execute("xa recover"); in [7]: print(cur.fetchone()); none in [8...

How do I render an html file in javascript? -

ok, using javascript sever side, including node.js. because of performance issues, have decided move 1 page being rendered server-side, not client side, server returns stream of html, rendered, client. i have seen this question , related answers, wondered if best or right approach. in particular, appropriate way render page, , run of javascript on within js or node.js call? ideas have looked at: call javascript code directly on page, , invert make generate html items needed. urgent, rather avoid re-writing more have to. render document, simple iframe generate html. how point page in iframe, server side? surely adding level of abstraction same problem. using ideas detailed above, wondering whether right route, given of problems have seen encountered it. edit: clarify - want to, in effect, load html page in browser, let finish rendering, , capture entire generated html passing through client (saving time render on client). this simple example server-side templat...

jqGrid change row color on checkbox checked -

i have seen many answers here re this, none seem work me. , don't understand why? jqgrid 4.4.2 for checked boxes db: gridcomplete: function() { $("input:checkbox:checked").closest('tr').addclass("redbackground"); }, doesn't work, closest('td') or parent() change cell bg color! and here on change: $(document).on('change', "input[type='checkbox']", function(){ if($(this).is(":checked")){ $(this).parent().addclass("redbackground"); }else{ $(this).parent().removeclass("redbackground"); } }); this work cell, if change closest('tr') or parent().parent() - row color doesn't change what missing?.. could row grouping? groupingview : { groupfield : ['date'], groupcolumnshow : [true], grouporder: ['desc'], groupdatasorted : true }, the best way set color or backgro...

javascript - Passing variables between ASP MVC pages without sending it to server -

i creating website asp.net mvc 4. application consists of 2 pages, workflow similar google maps. on first page, user types in patient's name, date of birth, , basic data patient. user submits form, , brought second page in application. second page print preview user can print. want user able navigate between 2 pages using browser's , forward buttons (for example, change inputs on first page after seeing second page) actually calculating data appears on printout complicated, , want have code executed server-side, can use c#. need send patient's data server. problem don't have ssl certificate, , don't want send patient's name data on http (as violation of privacy). willing send patient's data on http, long remains detached patient's identity (except @ client). name , date of birth displayed in corner of printout, , not affect server-side calculations in least. i can think of 2 possible ways accomplish task. first, more preferred solution,...

c++ - Algorithm to generate a point grid out of a plane equation -

i have plane equation in 3d-space: ax + by + cz + d = 0 , want fill plane within given radius specific point on plane regulary distributed points. seems me, there should mathematical elegant answer, fail see it. answer in c++ or pseudo-code better. i'll assume have reasonably 3d vector class, , call vec3 in answer. first thing need vector in plane. there few ways generate 1 given normal-plane equation, prefer one: vec3 getperpendicular(vec3 n) { // find smallest component int min=0; (int i=1; i<3; ++i) if (abs(n[min])>abs(n[i])) min=i; // other 2 indices int a=(i+1)%3; int b=(i+2)%3; vec3 result; result[i]=0.f; result[a]=n[b]; result[b]=-n[a]; return result; } this construction guarantees dot(n, getperpendicular(n)) zero, orthogonality condition, while keeping magnitude of vector high possible. note setting component smallest magnitude 0 guarantees don't 0,0,0 vector result, unless input. , in case, plane degenerate....

html - Using CSS !important in ExtJS setFieldStyle() -

i'm trying use setfieldstyle on textfield in extjs. have css sheet sets style on background of field white !important . unfortunately, cannot modify sheet need way update in extjs. i've tried using setfieldstyle('background: #000000'); add !important not run code. any ideas? setfieldstyle set style of input tag of field, input , field label wrapped in tag (usually table) using .getel() give outer element , can set style on this: .getel().setstyle('background', '#000000 !important')

jquery - move element after n:th child in javascript -

i'm trying move element class stamp2 after fifth child. attempted. item seems removed. $('.stamp2').remove().after('.section:nth-child(5)'); html: <section class="photo small stamp stamp1">..</section> <section class="photo small stamp stamp2">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo small">..</section> <section class="photo...

visual studio 2010 - Unique id/code of every deployed application -

i believe every deployed product (application) vs has unique id or smth that, doesn't change on distribution. mean publish app , give company 100 employees , product remains same unique id on every single pc installed. i have come across guid assembly information of program's project, not sure one. there such unique id of product, , if yes - can find , how can access in code itself. i.e.: string uniqueid = something.getproductid() or whatever... there 2 methods guid, fristly, can guid in assembly information. //gets assembly contains code executing. assembly asm = assembly.getexecutingassembly(); guid id= asm.gettype().guid; secondly, not taken assembly information.stored real custom attribute. var attribute = (guidattribute)asm.getcustomattributes(typeof(guidattribute),true)[0].; var id = attribute.value; more info can see assembly.getcustomattributes method (type, boolean) http://msdn.microsoft.com/en-us/library/88d17d13.aspx assembly.getexe...

fpdf - How to call an array outside a class using PHP and Codeigniter? -

hello guys need little here accessing data array outside class i'm confused on how show variable outside class here's code below: <?php date_default_timezone_set('asia/manila'); require('resources/fpdf/fpdf.php'); class pdf extends fpdf { function header(){ //here place should put array, cant access inside $this->setfont('arial','b',10); $this->cell(180,5,'purchase order',0,0,'c'); $this->ln(); $this->setfont('arial','',9); $this->cell(40,5,'suppliers name:'.$data['spname'].' '); $this->ln(); $this->setfont('arial','',9); $this->ln(20); } } $query = "select * po_order_details order_code = '".$code."'"; $result = $this->db->query($query); foreach($result->result_array() $row){ $data[] = array($row['item_qty'...

layout - UIScrollView messes up its subviews -

i have got uiscrollview subviews. subviews can expanded , folded. when uiscrollview loads, subviews folded , there no need uiscrollview enable scrolling. when expand subview, subviews under expanded subview moves down. can happen content size of uiscrollview not large enough when subviews expanded. try update contentsize this: `float scrollviewsizeheight = ingredientsview.frame.size.height + recipeview.frame.size.height + tasteview.frame.size.height + nutritionview.frame.size.height + 300; if (scrollviewsizeheight > scrollview.frame.size.height) { [scrollview setcontentsize:cgsizemake(scrollview.frame.size.width, scrollviewsizeheight)]; [scrollview setneedsdisplay]; }` new code tag weird -.- but when happens, subviews collapse , positions messed up. idea why? just deactivate autolayout in ib

xslt - Unexpected result from xsltproc - libXML -

i helping user when ran problem. i have piece of xslt try create 2 keys, 1 first occurrence (in same parent) of element containing given value on descendant , second 1 other occurrences same value on descendant. (sorry bad english) this first key, goal create set "the first of siblings", given record/id, indexed generate-id() value: <xsl:key name ="key1" match="datapage[not( preceding-sibling::datapage/record/id = record/id )]" use="generate-id()"/> in second key try dapapage elements "not first of siblings", given record/id, indexed generate-id() of "the first of siblings" same record/id: <xsl:key name="key2" match="datapage[ preceding-sibling::datapage/record/id = record/id ]" use="generate-id(preceding-sibling::datapage[ record/id = current()/record/id ][last()])" /> and templates <xsl:template match="/*">...

javascript - How to automatic make-up the divs in parent div -

i have parent div , child divs different width , height. how can float parent div child's max effective without loss space absolute positioned elements. the example: http://jsfiddle.net/ksbjt what kind of direction need dig? html <div class="parent" style="width: 500px; height: 500px; border: 1px solid #000; background: red; position: relative;"> <div style="width: 100px; height: 200px; border: 1px solid #000; background: blue;"></div> <div style="width: 200px; height: 500px; border: 1px solid #000; background: green;"></div> <div style="width: 100px; height: 200px; border: 1px solid #000; background: yellow;"></div> <div style="width: 100px; height: 200px; border: 1px solid #000; background: aqua; position: absolute; top: 200px"></div> </div> css .parent div { float: left; } i don't understand you're askin...

How to get integer value in Y-axis in Jqplot? -

in chart want integer values on y-axis , x-axis in place of decimal value (1 in place of 1.0). so please give me solution i have used this... "axes: { xaxis: { renderer: $.jqplot.categoryaxisrenderer, labelrenderer: $.jqplot.canvasaxislabelrenderer, tickrenderer: $.jqplot.canvasaxistickrenderer, ticks: ticks, tickoptions: { formatstring: '%d' } } }" try formatstring: "%.0f" . display whole numbers.

c# - Updating order status in Prestashop via webservice api -

what doing wrong here? first make request existing order , change value of current_status field in retrieved xml. make put request modified xml parameter in response: <?xml version="1.0" encoding="utf-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <errors> <error> <code><![cdata[127]]></code> <message><![cdata[xml error : string not parsed xml xml length : 2864 original xml : xml=%3c%3fxml+version%3d%221%2e0%22+encoding...%3c%2fprestashop%3e%0a]]></message> </error> </errors> </prestashop> when debug code there no problem xml parameter in put request before ececution. whay 'original xml' show xml ecoded so? have set kind of encoding? code in c#. it seems xml parameter has of type requestbody. if not specified automatically set type getorpost causing 'string not parsed xml' error. i'm not sure how works seems solution problem. ...

javascript - How to create External data-source in html5 -

in html5 input field has following format <input type='text', data-provide= "typeahead", data-items="4", autocomplete="off", data-source='["business , commercial laws", "consumer laws", "criminal laws"]', name='userinputname', placeholder='court of practice'> data </input> how create link above tag data-source not inline, external. want re-use data-source. edit: using typeahead plugin in bootstrap. programming in node.js framework. can use - var arrayvar = [ "this", "that", "here"] data-source='#{arrayvar}' but above converts array arrayvar string "this, that, here" not desired, data-source should array. data attributes can retrived jquery. $('[data-source']).each(function(){ // select elements data-source attribute var $this = $(this), source = $this.data("source"); // ...

Nested for loop in java to print the following -

how print following in java: 5 55 555 55 5 using nested loop no if statements. what have far: public static void main(string[] args) { for(int = 1; < 6; i++) { for(int k = 3; k > i; k--) { system.out.print(" "); } for(int k = 3; k < i; k++) { system.out.print(" "); } for(int j = i; j > 0; j--) { system.out.print("5"); } system.out.println(); } } as can see, got spaces correct not number of 5 's on each line yet. somehow feel there must possible use 1 loop spaces? you need first break pattern in 2 parts : upper half 5 55 555 lower half 55 5 in upper half there 3 rows printed. analyze each row. for row no. 1 there 2 blanks , 1 "5". for row no. 2 there 1 blank space , 2 "5"s. for row no. 3 there no blank space , 3 "5"s. so if represents rows when 1 i.e. row n...

javascript - Hyperlink not working in Google Script -

i'm trying insert hyperlink in google script returns text clear without hyperlink. check below: if (emailsent != email_sent) { if (visittype == "taking") { var subject = "equipment checked out storage"; mailapp.sendemail(emailaddress, subject, "hello" + "\n\nthis reminder myself " + emailaddress + "\n\ni " + visittype + " " + amount + " x " + equipment + "\n\nremember return within 15 days unless want keep equipment" + "\n\nthanks" + "\n\n sake of improving our service, please complete feedback form " + **<a href="https://docs.google.com/a/1234/sharing/.."> here </a>);** var url = "https://docs.google.com/a/1234/sharing/.."; "\n...

hibernate - google cloudsql + google app engine + spring mvc + hierbnate/jpa error -

i have problem cloudsql , hibernates connections,i use spring mvc 3 google app engine , hibernate / jpa. here loggs in gap console : uncaught exception servlet org.springframework.transaction.cannotcreatetransactionexception: not open jpa entitymanager transaction; nested exception javax.persistence.persistenceexception: org.hibernate.exception.jdbcconnectionexception: not open connection @ org.springframework.orm.jpa.jpatransactionmanager.dobegin(jpatransactionmanager.java:427) @ org.springframework.transaction.support.abstractplatformtransactionmanager.gettransaction(abstractplatformtransactionmanager.java:371) @ org.springframework.transaction.interceptor.transactionaspectsupport.createtransactionifnecessary(transactionaspectsupport.java:335) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:105) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframewo...

How to create fully reusable layout page template in wordpress? -

for pages, wordpress give default page template : page.php. that's clear , simple, default pages use template. then, wordpress give page template system, , when speak template think reusable think page layout template . example : full-width , page-width , sidebar-left ... specifie template use each page, it's ok. but when begin work on more complex web site, content not simple post (page type) inside page template anymore. reason or have use feature of wordpress : page-slug.php. before, of course can try shortcode develop, include specific plugins complex page etc 1 day, have no choice use page-slug.php. here comes problem : content "more specific , complex" still need use layout template, , can't... of course, hate duplicated code don't want "copy" template inside. if want specific page, use page-slug.php without page template , job. then... why wordpress don't consider page-slug.php pure content when (and when) page template spec...

sql - Reduce database records -

i have following table: groupid startdate time 1 2013-01-01 15:00 10 1 2013-01-01 16:00 10 1 2013-01-01 17:00 10 1 2013-01-02 08:00 10 1 2013-01-02 09:00 10 2 2013-01-01 15:00 2 2 2013-01-01 16:00 2 which has record every hour in above example (in real data record every minute). i need have such format today , yesterday, after time starts redundant - day grouping more enough. i ways thinking following way of reducing above records: run procedure every day copy data new "temp" table, grouping them together. drop original table , rename "temp" one. of course have restore relations (groupid column in above example). have 2 tables time, , query view instead of table (i insert , select records). every day copy grouped records "grouped" table , remove them "detailed" table in opinion both options generate problems, maybe there exist better way? update becaus...

python - Problems installing pandas and numpy on Mac OSX -

i playing python's pandas package before getting o'reilly book. when tried install pandas after installing xcode , epdfree pandas installation using easy_install presented many warnings, , when tested see if pandas working clear not. have tried remove , re-install pandas , numpy several times no success. new surely doing wrong. this when run python , try import pandas , numpy: $ python python 2.7.2 (default, oct 11 2012, 20:14:37) [gcc 4.2.1 compatible apple clang 4.0 (tags/apple/clang-418.0.60)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import numpy traceback (most recent call last): file "<stdin>", line 1, in <module> importerror: no module named numpy >>> import pandas no module named numpy traceback (most recent call last): file "<stdin>", line 1, in <module> file "/library/python/2.7/site-packages/pandas-0.12.0-...

c# - DataSource and DataSourceID are defined on 'ddlCustomerName'. Remove one definition -

how track page name entire solution when have got below error message "both datasource , datasourceid defined on 'ddlcustomername'. remove 1 definition." i have checked in entire solution did not both datasource , datasourceid . still not able figure out actual problem. your dropdownlist : ddlcustomername has both it's datasource , datasourceid properties set. 1 can set. check entire solution control. ensure 1 of properties set, both in xhtml , in .cs file.

java - JSP getAttribute() returning null -

so in servlet have following: public void doget(httpservletrequest req, httpservletresponse resp) throws servletexception, ioexception { resp.setcontenttype("text/html"); req.setattribute("colnames","ka"); req.setattribute("items", new string[]{}); //system.out.println(req.getattribute("colnames")); req.getrequestdispatcher("/index.jsp").forward(req,resp); } my servlet: <%@ page language="java" contenttype="text/html; charset=iso-8859-1" pageencoding="iso-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ page iselignored="false"%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; cha...

ios - Is there a way to convert ipa to xcode file? -

my computer got damaged. lost xcode project files. have ipa file app. there way convert ipa file xcode? or @ lease recover of project files using ipa file? no, there not. code compiled native code. unless @ reading assembly out of luck. you able extract resources ipa (it's zip file).

php - Multiple forms on same page - If empty -

i'm in process of coding mysql search page , i'm unable work out how make if there's no data put in 1 form it'll nothing, , if there's data in other form it'll search database value. <?php echo '<h3 class="hp-1">kick logs</h3><div class="wrapper"> <div class="logcol-1"><form name="form1" id="mainform" method="post"enctype="multipart/form-data" action="' . $_server['request_uri'] . '"> <input name="name" type="text" id="name" placeholder="players name"> </form>'; echo '<form name="form2" id="mainform" method="post"enctype="multipart/form-data" action="' . $_server['request_uri'] . '"><input name="reason" type="text" id="reason" placeholder="kick reason"...

c# - How to disable Suspending || Closing || Terminating event for my Metro Style App on Windows 8 Pro -

i'm french developer , need develop metro style app windows 8 pro launched. wanted know how can disable close event of app. app need in front time , user couldn't quit app. i thought disable shortcut gpo close gesture (drag app top bottom) need me disabled too. i hope clear , understand question :-). feel free ask me more specific questions. cordially renaud. the short answer is: can't. the operating system , user control lifetime of metro style apps, can't block user switching away app , once app no longer in foreground, application suspended , system can terminate application @ moment. similarly, user close gesture cannot blocked.

MongoDB - How to organize collections -

just general question here - i'm doing self paced learning on mongodb , off on right foot i'd opinion on how organize collections sample budget application. as home budget have 'categories' such home, auto , have subcategories under categories such mortgage , car payments. each bill have due date, minimum amount due, forecast payment, forecast payment date, actual payment , actual payment date. each bill due 'someone', example home, mortgage may due bank of america, , bank of america may have contact info (phone, mailing address). making switch table structure mongo bit confusing, appreciate opinions on how approach this. the question general. in general :), following principles apply schema design in mongodb: the layout of collections should guided sound modeling principles. mongodb, can have schema more closely resembles object structure of data, opposed relational "projection" of it. the layout of collections should guided ...

angularjs - Dynamic form with parent child combos -

i new angularjs , after watching pluralsight videos decided build simple web page using it. the page should load 1 select box populated ajax request (this contains of data). then, based on value selected, new select element may need created containing child data. continue happen until option selected has no child ids. format of data api follows. [ { "childids" : [ ], "id" : "1", "name" : "top level", "parentid" : null }, { "childids" : [ "51" ], "id" : "22", "name" : "levela - 1", "parentid" : "1" }, { "childids" : [ "38", "26" ], "id" : "24", "name" : "levela - 2", "parentid" : "1" }, { "childids" : [ ], "id" : "38", "name" : "lev...