Posts

Showing posts from 2015

Parse XML doc from url with ruby -

i not familiar xml , learning ruby go. problem having xml file using formatted different examples out there. attempting nokogiri seems popular of doing this. my xml file url , looks this <guides of="xml" rtn="5" tot="10" cv="1" a="xpu_nextstep" id="0" " w="" q="" g="echo" gr="homerec" gt="doc" js_q="" token="0:1qeu|5ig|557|1y7p|4re|"> <r t="orbelle toddler bed - cappuccino" g="echo" s="1" rk="1" pt="0" at="0" pr="0" ar="0"> <a n="onsale" v="yes"/> <a n="sku" v="oti041"/> <display> <thumb n="imagename" v="http://images/mgen/master:oti041.jpg?is=400,400"/> <labels> <l n="saleprice" v="sale price: 69.98"/> ...

javascript - Distributed json loading in force collapsable layout -

i quite new d3 , appreciate help. trying modify force collapsible layout https://bitbucket.org/kolbyjafk/d3/src/f87f85b9c6e2/examples/force/force-collapsible.html the data loads in single json file https://bitbucket.org/kolbyjafk/d3/src/f87f85b9c6e236f20dec8151ae11438950aaf967/examples/data/flare.json?at=fix-interpolate-hsl but if have data dont want load in go. want call children when user clicks on particular node. so want modularize json when node clicked, json file containing array of children loads dynamically. i need data huge, 500k leaf node. how dynamic loading? to maybe started, click function in code key solve this. right looks this: function click(d) { if (d.children) { d._children = d.children; d.children = null; } else { d.children = d._children; d._children = null; } update(); } this hides/shows nodes in structure moving them between 2 different arrays: children when visible; _children when not. what might want ...

UnexpectedValueException in session_start() php failing SPLObjectStorage serialization -

why unexpectedvalueexception thrown in session_start() ? i have object has property of splobjectstorage . object assigned session like $_session['foo'] = $barobject; i suspect internal session serializing facing problem decode it. store session in database , looks serializing objectstorage can not decode it. sample session data self|o:4:"user":8:{s:5:"�*�id";n;s:7:"�*�nick";n;s:13:"�*�reputation";i:1;s:11:"�*�password";n;s:8:"�*�email";n;s:7:"�*�crud";o:10:"crudobject":2:{s:13:"�*�fieldcache";a:0:{}s:13:"�*�dependency";r:1;}s:7:"�*�auth";n;s:11:"�*�rolelist";c:11:"rolestorage":23:{x:i:1;n;,r:13;;m:a:0:{}}} rolestorage extends of splobjectstorage session_decode() on above string returns false ideas? removing rolelist attribute makes serialize properly. if separately do $sr = serialize($roles); // $roles rolestorage object ...

c# - Can I virtualize my own UserControl? -

i have own usercontrol hundreds of displayed in grid. have profiled code , found time being taken myusercontrol.initializecomponent(), i.e. creating each 1 of myusercontrol's. ui virtualization perfect solution, i.e. not creating control until visible, because of controls off screen. these controls not live in itemscontrol there anyway in wpf?

php - get table cell data from and place a copy in another table -

two-part question: have 2 tables: 1 table items , other table selected items copied when add button clicked. after, when items wanted selected, there 'finished' button post items selected db. i started javascript didn't far @ because jquery seems better suited i'm not familiar it function addto() { var div = document.getelementbyid('fixeddiv','inside'); div.innerhtml = div.innerhtml + 'item added'; } <div id='fixeddiv'> <table align="center" id="tradee"> <th rowspan="2"> other item</th> <?php while($rowi =$item->fetch_assoc()) {?> <tr> <td> <?php echo $rowi['item_name']; ?> </td> <td><?php echo $rowi['item_description'];?></td> </tr> <?php } ?> </table> <br> <table align="center" id="tradetable"...

windows 8.1 - x:Name doesn't work in XAML Flyout control -

i tried following in windows 8.1 c# app: <!-- xaml file --> <page.bottomappbar> <commandbar> <appbarbutton label="add news feed" icon="add"> <appbarbutton.flyout> <flyout> <stackpanel width="400"> <textblock textwrapping="wrap" text="enter text:" margin="0,0,0,10"/> <textbox x:name="inputtextbox"/> <button content="add" horizontalalignment="right" verticalalignment="stretch" click="addbutton_click"/> </stackpanel> </flyout> </appbarbutton.flyout> </appbarbutton> </commandbar> </page.bottomappbar> // c# file private void addbuton_click(object sender, windows.ui.xaml.routedeventargs e) { ...

officewriter - Password protected excel -

can create password protected excel workbook or sheet 'officewriter' api? requirement create pwd protected excel programatically (c#) out having install office in servers. have tried openxml when password protected file showing corrupted , not opening. let me know if possible 'officewriter'. note: work softartisans, makers of officewriter. yes, possible password protect excel workbook programmatically officewriter. if using our excelapplication api programmatically manipulate workbook, can protect workbooks , worksheets. workbook.protect(string) protect structure of workbook supplied password. example, users won't able add or remove worksheets without password. worksheet.protect(string) write-protects worksheet users cannot modify worksheet in excel without entering password. excelapplication xla = new excelapplication(); workbook wb = xla.open("myworkbook.xlsx"); wb.protect("workbookpassword"); wb.worksheets["she...

cocos2d android - How to Detect the CCSprite Touchevent getBoundingbox equals of CCTouches -

i new cocos2d. using ccsprite animation button. struggle detect cctouches , ccsprite getbounding box equals click event. from way can achieve need , write code in cctouches___() : arraylist<ccsprite> animation= new arraylist<ccsprite>(); cgpoint location = ccdirector.shareddirector().converttogl(cgpoint.ccp(event.getx(), event.gety())); (ccsprite target : animation){ if(cgrect.containspoint((target.getboundingbox()), location)){ //here want }

mysql - updating a field on update of other field in same row -

i have table this: user_level uid | level_order | current_level --------------------------------- 1 | 1,2,3 | 1 2 | 4,5,6 | 4 3 | 7,8,9 | 7 now, if update level_order field particular user, want update current_level using trigger or procedure. for example if run query : update user_level set level_order = '21,22,23' uid=1; table should update this: uid | level_order | current_level --------------------------------- 1 | 21,22,23 | 21 2 | 4,5,6 | 4 3 | 7,8,9 | 7 is possible using trigger or procedure . using mysql . i think dont need trigger.you can update directly this. update user_level set level_order = '21,22,23', current_level=substring_index('21,22,23', ',', 1) uid=1; sql fiddle demo

html - taking value from function in php and showing in div or column the value, reloading page with previous values -

i having 2 fields 'name' , 'username'. checking username availability , able check. problem manner in display form. want achieve showing messages in same row in username displayed in third column. while showing messages, should display previous entered values. and want achieve html, javascript , php. don't want go other language or technology login.php building form. <?php include 'login2.php'; function form($name, $username) { ?> <form name="mylogin" method="post"> <table> <tr><td>name</td> <td><input type="text" id="name" name="name" value="<?php echo $name?>" required></td></tr> <tr><td>username</td> <td><input type="text" id="user" name="user" value="<?php echo $username?>" required></td> <td id="messgae"></td...

c++ - How can i get the top n keys of std::map based on their values? -

how can top n keys of std::map based on values? there way can list of example top 10 keys biggest value values? suppose have map similar : mymap["key1"]= 10; mymap["key2"]= 3; mymap["key3"]= 230; mymap["key4"]= 15; mymap["key5"]= 1; mymap["key6"]= 66; mymap["key7"]= 10; and want have list of top 10 keys has bigger value compared other. example top 4 our mymap key3 key6 key4 key1 key10 note: values not unique, number of occurrences of each key. , want list of occurred keys note 2: if map not candidate , want suggest anything, please according c++11 ,i cant use boost @ time. note3: in case of using std::unordered_multimap<int,wstring> have other choices? the order of map based on key , not values , cannot reordered necessary iterate on map , maintain list of top ten encountered or commented potatoswatter use partial_sort_copy() extract top n values you: std::vector<std...

iphone - Converting a typdef struct into NSMutableArray -

i trying figure out how take typdef struct such following: typedef struct { float position[3]; float color[4]; float texcoord[2]; } const vertex; and turn seperate arrays. i have following conversion array: + (...)arrayconverter: (vertex *) v { // turn typedef struct seperate arrays nsmutablearray *position = [[nsmutablearray alloc] init]; nsmutablearray *color = [[nsmutablearray alloc] init]; nsmutablearray *texcord = [[nsmutablearray alloc] init]; const nsmutablearray *vertexdata = [[nsmutablearray alloc] init]; (int p=0; p<(sizeof(v->position)/sizeof(v)); p++) { [position addobject:[nsnumber numberwithfloat:v->position[p]]]; } (int c=0; c<(sizeof(v->color)/sizeof(v)); c++) { [color addobject:[nsnumber numberwithfloat:v->color[c]]]; } (int t=0; t<(sizeof(v->texcoord)/sizeof(v)); t++) { [texcord addobject:[nsnumber numberwithfloat:v->tex...

How to define object array in java? -

in c# can write below code; object[] params = new object[4] { "a", 10, "c", true}; what java notation of above code? object[] param = new object[]{ obj0, obj1, obj2, ..., objx }; or object[] param = { obj0, obj1, obj2, ..., objx}; or object[] param = new object[x+1]; param[0] = obj0 ; ... param[x] = objx ;

c# - how to use session in hyper link selection -

this code link, want navigate if , if session not null, how can it, please me... <asp:hyperlink id="hyperlink1" navigateurl="year1sem1sub1.aspx" runat="server" align="left" onclick=(>cis 11301 fundamentals of information systems</asp:hyperlink> <img src="images/guestpic.jpg" align="right"/> this authentication.ascx code public partial class webusercontrol1 : system.web.ui.usercontrol { protected void page_load(object sender, eventargs e) { if (session["loggeduser"] == null) { response.redirect("logintothesite.aspx"); } } } it's not clear want hyperlink , think understand mean if (session["loggeduser"] != null) { hyperlink1.navigateurl = "year1sem1sub1.aspx"; // // or response redirect here // } else { hyperlink1.visible = false; }

Perl-CGI Image is displayed in browser as binary -

i programming little plugin, generates image via perl gd , displays in browser. far works correct, except image displayed in binary character stream. it's rather annoying google kind of problem, because read temporarily saving file hard disk, love avoid. this code have far: $image = $print->png; ## image created correctly, able #view if saved on local drive $cgi = new cgi; print $cgi -> header(), $cgi -> start_html(), $cgi -> h1('bernd'), $cgi -> header(-type=>'image/png'); binmode stdout; print $image; print $cgi -> end_html(); to have call special method of cgi module? because did not find 1 little bit confused. any appreciated. in advance! when it's png, image must separate resource/url, pointed html img element or similar, not flow text embedded document. these basics of html, web programming book if not familiar that. either change image format inline svg, or rewrite program creates img element, , p...

c# - DotNetNuke ModuleAction server-side processing -

in dnn possible add moduleaction menu item. according this article on dnn site possible additional processing on server-side. after converting code c#, actionhandler never called. this code: public moduleactioncollection moduleactions { { moduleactioncollection actions = new moduleactioncollection(); moduleaction urleventaction = new moduleaction(modulecontext.getnextactionid()); urleventaction.title = "action event example"; urleventaction.commandname = "redirect"; urleventaction.commandargument = "cancel"; urleventaction.url = "http://dotnetnuke.com"; urleventaction.useactionevent = true; urleventaction.secure = dotnetnuke.security.securityaccesslevel.admin; actions.add(urleventaction); return actions; } } private void myactions_click(object sender, dotnetnuke.entities.modules.actions.actioneventargs e) { dotnetnuke.ui.skins.skin.addmodul...

java - How to put Simple XML Serialization model-objects into a Bundle? -

i using simple xml serialization library in android app parsing , mapping xml response web service objects, so: @root(name="root_tag", strict=false) public class xmlrequest { @path("a/b") @elementlist(name="routelist") private list<route> routes; public arraylist<route> getroutes() { return new arraylist<route>(routes); } } i have several more dependent model-classes (like route ) written in similar way proper annotations, parsing mapping works fine. i want pass route list new fragment , display in listview . there quite lot of variables in several more model-classes, wanted classes implement parcelable , pass list fragment: public static resultfragment newinstance(arraylist<route> routes) { resultfragment fragment = new resultfragment(); bundle args = new bundle(); args.putparcelablearraylist(route_list_key, routes); fragment.setarguments(args); return fragment; } my problem:...

html - Twitter Bootstrap 3 Sticky Footer -

i have been using twitter bootstrap framework quite while , updated version 3! i'm having trouble getting sticky footer stick bottom, have used starter template supplied twitter bootstrap website, still no luck, ideas? just add class navbar-fixed-bottom footer. <div class="footer navbar-fixed-bottom">

Prevent session id from appearing in browser address bar in asp.net -

i have asp.net application uses cookieless session. pages displays session id part of uri. change this. application built asp.net 1.1 , has been converted asp.net 4.0 conversion wizard. i added sessionstate tag under system.web in order enforce "cookieless=false". change has no effect. can tell me should looking? many in advance bm change cookieless "usecookies" have session stored inside cookie. otherwise session embedded url. here's more information msdn site if have set cookieless false in web.config file , still showing sessionid in url, means browser has cookies disabled. check browser setting , enable browser accept cookies. there no way hide sessionid if cookies disabled browser. there work around here: hide session id in url reference

updating multiple properties in Cypher (neo4j) -

i cannot update node using set multiple properties in neo4j, there way handle this? start n=node:wordindex(word='repine') set n.wordtype = 'rare' return n if want add n.link = "..." how done? start n=node:wordindex(word='repine') set n.wordtype = 'rare', n.link='link' return n should it

php - Limit fetch results by page -

this file included in index file, want not more 5 posts on page , under posts 1 2 3 4... , etc. (links next pages) , index.php?page=2 sorry bad grammar. <?php if(isset($_get['post_edit'])) { $p_id = $_get['post_edit']; $p_query = mysql_query("select title, post posts id='$p_id'"); $p_array = mysql_fetch_array($p_query); $title = $p_array['title']; $post = $p_array['post']; } ?> <?php if(isset($_post['edit'])){ $title_edit = $_post['titleedit']; $post_edit = $_post['postedit']; if(empty($title) or empty($post)){ echo "<p>fields empty!</p>"; } else { mysql_query("update posts set title='$title_edit', post='$post_edit' id='$p_id'"); echo "edit succesful!</br>"; header('location: index.php'); } } ?> ...

.htaccess - Removing index.php in CodeIgniter resulting 5xx server error -

suppose have following url subdomain.example.com/myfolder where "myfolder" root folder of ci installation (where application folder located). i have following .htaccess (credits fabdrol & elliothaughin): <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewritecond %{request_uri} ^system.* rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond %{request_uri} ^application.* rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule> when ever try access website such as: subdomain.example.com/myfolder/controller/etc... it returns 5xx internal server error. if add subdomain.example.com/myfolder/index.php/controller/etc... it works perfectly. pretty sure there wrong .htaccess don't see problem is. could please me fix hta...

c# - Using similar Controllers in areas in Asp.Net Mvc -

i'm developing sport based web site asp.net mvc 4 . the site being developed show 1 sport data @ time. the sports have similar datas in common have different datas. site supports many sports that’s why, not want use common controllers/views seperating sports if statements. i tried one: i have created area each sport. described controllers in area related sport. for example, in route, name of controller , area stated, firstly searched in area, if not there, searched in default( /controllers ). because controllers share same names, mvc defaultcontrollerfactory throws "ambiguous controller name exception". first i’m searching area, if cannot found i’m searching in default writing own controller factory. can reach project aid of link in case, biggest deficiency is; without indicating namespace in route making same thing in views. search view in area, if not found search in default. because project theme-supported, use own themable razor view engine, not d...

How to create add colors to listview in android? -

i working on listview in android , want alternate colors listview? my code: string listview_array[] = { "1. test1", "2. test2" } public void oncreate(bundle icicle) { super.oncreate(icicle); setcontentview(r.layout.main); lv = (listview) findviewbyid(r.id.listview); lv.setadapter(new arrayadapter<string>(this, r.layout.listview_header_row, listview_array)); lv.settextfilterenabled(true); } any suggestions? use custom adapter this public class mysimplearrayadapter extends arrayadapter<string> { private final context context; private final string[] values; public mysimplearrayadapter(context context, string[] values) { super(context, r.layout.rowlayout, values); this.context = context; this.values = values; } @override public view getview(int position, view convertview, viewgroup parent) { layoutinflater inflater = (layoutinflater) context .getsystemservice(contex...

annotations - J2EE Remote Enterprise Java Beans and Hibernate Annotated Classes -

i'm setting new application environment new j2ee-technologies (ejb, hibernate) in netbeans 7.3.1 , glassfish 4.0 application server. i'm going install core module (user management framework) remote enterprise bean uses hibernate persist entities (such users). these entity classes heavily uses hibernate annotations. now, want add web-frontend (jsf) , query data core module. example, want retrieve list of users core module. if use entity classes above communication, hibernate libraries must included web-frontend because these classes annotated. is there way avoid this? want hide persistance web frontend.

c# - Are delegates created via lambda expressions guaranteed to be cached? -

it seems working way, stated somewhere in spec or implementation detail can't depend on? i'm trying speed property/field name extraction faster creating expression tree once , caching it. wrapping tree in lambda , using key cache. , break down miserably if runtime decides create new delegate every time hits same lambda expression. // keyvaluepair<string, t> getpair<t>(func<expression<func<t>>> val)... var item = new item { num = 42 }; var pair = getpair(() => () => item.num); // guaranteed same instance? // pair.key = "num" // pair.value = 42 edit: ok, here full thing. seems works , doesn't seem generate garbage in process. another edit: ok, changed it, doesn't seem capture anything, , works faster! using system; using system.diagnostics; using system.linq.expressions; using system.runtime.compilerservices; class program { static void main(string[] args) { var pair = new pair<int>(); ...

c - sscanf() double showing zeros -

i'm having troubles sscanf() function read doubles. have comma separated text file this: abc,def,0.465798,0.754314 ghi,jkl,0.784613,0.135264 mno,opq,0.489614,0.745812 etc. so first line fgets() , use sscanf() 2 string , 2 double variables. fgets(buffer, 28, file); sscanf(buffer, "%4[^,],%4[^,],%lf[^,],%lf[^\n]", string1, string2, &double1, &double2); printf("%s %s %f %f\n", string1, string2, double1, double2); but output is: abc def 0.465798 0.000000 ghi jkl 0.784613 0.000000 mno opq 0.489614 0.000000 so somehow doesn't scan last float. i've tried %lf[^ \t\n\r\v\f,] , %lf still doesn't work. change "%4[^,],%4[^,],%lf[^,],%lf[^\n]" to int result; result = sscanf(buffer, "%4[^,],%4[^,],%lf,%lf", string1, string2, &double1, &double2); if (result != 4) // handle error notice & on double1 , double2 - likley typo. also strongly recommend check result 4. not checking sscanf(...

wordpress - Get images used in, but not attached to page? -

i want of images used in page. code i'm using: function get_page_images($id) { $photos = get_children( array( 'post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'asc', 'orderby' => 'menu_order id') ); $results = array(); if ($photos) { foreach ($photos $photo) { // correct image html selected size $results[] = wp_get_attachment_image($photo->id, $size); } } return $results; } this gets images uploaded page, if have reused image uploaded different page/post, aren't retrieved (as attached post uploaded to, not posts reused in). know way all images used in page/post? use built-in php dom parser grab images located in content. code untested, should started in right direction: ...

php - Select element from other table on the form zf2 -

i have 2 table manytoone relation on database between client , sale , want select id_client on sale form . o used . saleform : public function __construct(clienttable $table) { parent::__construct('vente'); $this->setattribute('method', 'post'); $this->clienttable = $table; $this->add(array( 'name' => 'id', 'attributes' => array( 'type' => 'hidden', ), )); $this->add( array( 'name' => 'id_client', 'type' => 'select', 'attributes' => array( 'id' => 'id_client' ), 'options' => array( 'label' => 'catégory', ...

camera - code work on android 4.1 but don't on 4.2 (possible?) -

i'm writing application record video front camera. possible app can't work on android 4.2? i've tried tablet 4.1.1, customer says not work in tablet. this code related recording: //create surface view public void surfacecreated(surfaceholder holder) { mcamera= camera.open(1); setcameradisplayorientation( this, 1, mcamera); viewgroup.layoutparams params = msurfaceview.getlayoutparams(); parameters parameters = mcamera.getparameters(); list<size> sizes = parameters.getsupportedpreviewsizes(); params.width = (sizes.get(0).width / 4); params.height = (sizes.get(0).height / 4); msurfaceview.setlayoutparams(params); } i things error in code edit i have insert lot of log... app freezing when stopping recorder. call on trycatch.. try{ appendlog(...

node.js - REFERENCE KEY in node-orm2 -

i working on rest api based on node.js , chose postgresql database store data. suppose database has 2 tables names user , comment . comment belongs 1 user , when decide remove user , comment 's of him/her must removed. so, designed table follows: create table user( user_id serial, username varchar(32) not null, password varchar(32) not null, constraint pk_user primary key (user_id), constraint uq_user unique (username) ) create table comment( comment_id serial, user_id integer not null, content text not null, constraint pk_cmnt primary key (comment_id), constraint fk_cmnt foreign key (user_id) references user(user_id) on update cascade on delete cascade ) but don't run code , use node-orm2 instead. designed 2 simple models handle simple code: var user = db.define('user', { username: { type: 'text', size: 32, // varchar(32) required: true, // not null unique: true...

command line - Python: find current directory of remote "cmd.exe" processes -

i write script among other things erases directory using shutil.rmtree i have ensure no "cmd.exe" opened in directory (and blocking me erasing directory). i can killing "cmd.exe" on remote computer: process_name = "cmd.exe" computer_name = "atacama6" try: subprocess.check_call('taskkill.exe /s {} /u admin1 /p abc$ /im {}'\ .format(computer_name, process_name)) except subprocess.calledprocesserror: # no matches found - thats ok! pass but afraid of killing "cmd.exe" processes opened in other directories , need run. how can kill ones opened in specific directory?

Semantic Web-rdf-Workers' projects and used computers in a company according to years -

i want sesame rdf database workers in company. workers involved in projects in date range. have computers. after database, must able search database according computers used people or people worked in projects in past or now. so, cant decide how order attributes of worker, company, project, computer because dont know place attribute year . example, workers' past companies or past projects... how can place year in rdf file below? didnt place year in file in proper way, think. because start , end dates should defined in way or date range? after how search sparql find people working in special project or before now? or people using same computer in different years? <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:worker="http://www.semantic.fake/worker#" xmlns:company="http://www.semantic.fake/company" xmlns:project="http://www.semantic.fake/project"> <rdf:description rdf:about="http://www.semantic...

tomcat - Continuous Delivery with Grails -

background: my team has been using jenkins run our continuous integration (ci) our grails applications. trying move closer continuous delivery setting deployment pipeline , having push button deployments multiple environments (dev, itg, prod). have tried use jenkins tomcat plugin deploy our code have run occasional permgen issues on tomcat , have manually restart after deployment. questions: is jenkins right tool use automated deployments grails? how can automate deployment tomcat without having manually restart afterwords? i don't think can if jenkins "right" tool, one. when hot-deploy tomcat, permgen inevitably grow. restart easiest way handle this. see other questions what makes hot deployment "hard problem"? more information. can use post build task run shell script on jenkins server deploys war , restart tomcat.

css3 - Pure CSS scrolling UL LI table with fixed header -

i'm trying implement pure css scrolling ul-li table fixed header. my requirements: using table css (table, table-row, table-cell, table-header-group...) all cells have list items (li) header has fixed when table content scrolling when table column changes width, appropriate header width should changed currently have html: <ul class="testtable"> <div class="testheader"> <li class="testrow"> <span>id</span> <span>name</span> <span>description</span> <span>other details 1</span> <span>other details 2</span> </li> </div> <div class="testbody"> <li class="testrow"> <span>1</span> <span>2</span> <span>3</span> <span>4</span> ...

python - Data import from excel breaking up the values -

taking data excel spreadsheet fourth column fourth_column = [32.86667, 34.08333, 39.0, 36.63333, -13.2, 30.8, 14.3] these values latitude , similar values longitude. wondered if there easy way running them each separately through code 1 after other, setting latitude equal take each value in turn. for value in fourth_column: do_something(value)

c++ - Unpacking msgpack to an arbitrary object, without msgpack_define -

i'm working on body of code deals custom string implementation rather std::string (long story various reasons has used) refer "string" here on. i able pack string without issue using "raw" type pack raw char bytes , size i'm having problems unpacking it. i able manually unpack shown below. // before i've unpacked point following object has string msgpack::object_kv& kv = obj.via.map.ptr[0]; // kv.key == string want string key = string(key.via.raw.ptr, key.via.raw.size); // works but want use built in >> operator or .as template function , haven't been able manage it. don't have access modify string class add msgpack_unpack function nor add msgpack_define i tried creating struct , giving msgpack_unpack function, apparently calls msgpack::object::implicit_type compiler replies error: 'struct msgpack::object::implicit_type' private and can't figure out way of getting msgpack::object out of "implicit_type...

php - cURL returns same results with different query -

curl returns same results different query ajax. if copy query in url field of browser, works , returns correct results. test.php <?php header("content-type: text/html; charset=iso-8859-1"); curl_setopt($c, curlopt_fresh_connect, 1); // don't use cached version of url $query = $_get['query']; $source = $_get['source']; $startdate = $_get['startdate']; $enddate = $_get['enddate']; if($query != ""){ $query = '%20and%20' . $query ;} $req = '...:['. $startdate .'t00:00:00z%20to%20'. $enddate .'t00:00:00z]%20and%20origin:'. $source . $query; $curl1 = curl_init($req); curl_setopt($curl1,curlopt_fresh_connect, true); curl_setopt($curl1,curlopt_returntransfer, true); $result = curl_exec($curl1); echo $result; script.js $.ajax({ url : 'test.php', type: 'get', datatype: 'json', ...

c# - Method must have a return type on an InitializeComponent() method -

i have partial public class namespace bugnetwpf { public partial class reportscreen_idrangereport : page { public generatereport(mainwindow mainwindow) { initializecomponent(); } } } the error saying method must have return type, ideas how fix this? what else saying return type true, i'm guessing want: namespace bugnetwpf { public partial class reportscreen_idrangereport : page { public reportscreen_idrangereport(mainwindow mainwindow) { initializecomponent(); } } } the constructor needs have same name class.

Error creating folder in google drive through ruby -

i'm having trouble creating folder in google drive using google-drive-api library in ruby. can log in, list folders, add file root folder. have folder called 'applications' under root folder. listing files show id folder, lets call "0bwivxebt'. in controller init google drive connection (as i'm able list files) , call create_parent('test') method in google_drive_connection.rb: def create_folder (title) file = @drive.files.insert.request_schema.new({ 'title' => title, 'description' => title, 'mimetype' => 'application/vnd.google-apps.folder' }) file.parents = [{"id" => '0bwivxebt'}] # 0bwivxebt id applications folder media = google::apiclient::uploadio.new(title, 'application/vnd.google-apps.folder') result = @client.execute( :api_method => @drive.files.insert, :body_object => file, :media => media, :parameters => { ...

php - Jquery form post errors -

i new in jquery. i'm working on form. title , text (textarea) when fill out fields , click send, 2 alerts appear when click ok 2 times scroll page up. fill in fields , starts again beginning. how can ensure after 2 checks continues page? jquery: $("#formpages").submit( function(event) { var title = $('#title').val(); var text = $('#text').val(); if(title == ''){ $("#titleerror").html("<p>fill title</p>"); alert('title empty'); } if(text == ''){ $("#texterror").html("<p>fill text</p>"); alert('text empty'); } $("html, body").animate({ scrolltop: 0 }, 600); event.preventdefault(); }); form: <form class="form" id="formpages"> <div> <label class="title"...

html - Separate CSS for label checkbox to label input -

i have used label both input textboxes: <label for="username">username</label> <input id="username" type="text" value=""> and checkboxes/radioboxes <label for="live">system live</label> <input id="live" name="live" type="checkbox" value="false"> the trouble have how specify different css labels different input types. if generic label css: label { color: #00a8c3; line-height: 20px; padding: 2px; display: block; float: left; width: 160px; } i find either end unaligned checkboxes or badly positioned textboxes. you add classes labels. example: <label for="username" class="textbox-label">username</label> <input id="username" type="text" value=""> <label for="live" class="checkbox-label">system live</label> <inpu...

app store - iTunes Connect Autoingestion.class doing nothing -

This summary is not available. Please click here to view the post.

css - DIVs Failing to Align Properly -

i trying align 2 divs side side. image on left, text on right first item. text on left, image on right second item. , image on left, text on right third item. it works first , third items. second item fails align. have done wrong? <!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> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> <style type="text/css"> .container { padding: 5px; background-color:#66c; } .imagecontainer { margin: 0 25px 0 0; float: left; height: 301px; width: 301px; background-color:#0cc; position:absolute; margin-bottom: 50px; } .imagecontainerrt { margin: 0 0 0 0px ; float: left; height: 301px; width: 301px; background-color:#0cc; ...

python - Scrapyd init error when running scrapy spider -

i'm trying deploy crawler 4 spiders. 1 of spiders uses xmlfeedspider , runs fine shell , scrapyd, others use basespider , give error when run in scrapyd, run fine shell typeerror: init () got unexpected keyword argument '_job' from i've read points problem init function in spiders, cannot seem solve problem. don't need init function , if remove still error! my spider looks this from scrapy import log scrapy.spider import basespider scrapy.selector import xmlxpathselector betfeeds_master.items import odds # parameters myglobal = 39 class homespider(basespider): name = "home" #con = none allowed_domains = ["www.myhome.com"] start_urls = [ "http://www.myhome.com/oddxml.aspx?lang=en&subscriber=mysubscriber", ] def parse(self, response): items = [] tracecompetition = "" xxs = xmlxpathselector(response) oddsobjects = xxs.select("//oo[odd...

c# - What could cause this memory issue? -

Image
i'm working on app windows phone 8, , i'm having memory leak problem. first background. app works (unfortunately) using webbrowsers pages. pages pretty complex lot of javascript involved. the native part of app, written in c#, responsible doing simple communication javascript(e.g. native delegate javascript communicate server), make animation page transition, tracking, persistance, etc. done in unique phoneapplicationpage. after had crashes out of memory exceptions, started profiling app. can see webbrowsers, big part of the app, being disposed correctly. problem i'm seeing memory continues increase. what's worse, have little feedback profiler. understand, profiler graph says there big problem, while profiler numbers there's no problem @ all... note: step represents navigation webbrowser webbrowser. spike created (i suppose) animation between 2 controls. in span i've selected in image, doing navigation forward , 1 backward having maxium of 5 web...