Posts

Showing posts from January, 2011

javascript - Owl Carousel - Unconnected with Different Widths -

here code: here main script: $(document).ready(function() { $("#owl-example").owlcarousel({ items:11, loop:true, margin:0, autoplay:true, autoplaytimeout:1000, autoplayhoverpause:true, autowidth:true }); }); here div: <div id="owl-example" class="owl-carousel" style="height:27px;"> <div class="tag">1asfg</div> <div class="tag">2f</div> <div class="tag">3d34gs</div> <div class="tag">4barthrg</div> <div class="tag">5gef</div> <div class="tag">6gef</div> <div class="tag">7gef</div> <div class="tag">8gef</div> <div class="tag">9gef</div> <div class="tag">10gef</div> <div class="tag">11gef</div> </div>

php - 1000 User GCM: Array to String Conversion Error -

i attempting send batched gcm messages in blocks of 1000. however, below code returns error array string conversion in c:\xampp\htdocs\index.php on line 651 on line: echo updatedatagcm($db); within action: case "sendgroupmessage": if ($userid = authenticateuser($db, $username, $password, $gcmregid)) { if (isset($_request['togroupid'])) { // instead of tousername it's groupid $togroupname = $_request['togroupname']; $togroupid = $_request['togroupid']; $message = $_request['messagetext']; $campaign = $_request['campaign_id']; $location = $_request['location_id']; // query users id's in group not user sending message $sqlgroupmembers = "select distinct usersid users_groups usersid != '".$userid."

android - Cocos2d Javascript .Apk Crashes on Startup -

i made cocos2d-js 3.5 project using "empty complete project" template in cocos. runs fine on android when debug cocos code, when compile .apk "cocos compile -p android -m debug", copy galaxy s4 running cyanogenmod 11 , install it, crashes on startup no useful error messages. gives me popup says "unfortunately [my app] has died". similarly, relevant message can find logcat "[my app] has stopped". i've recreated project , tried in release mode , ndks r10c, r10d, , r9d, , it's same. frustrating. ideas? edit: update: tested on 2 friends' phones, same error. edit again: set exact same environment on old macbook, , works great. (previously on windows 7.) guess have do.

google apps script - Drive Migrator Fail Message -

i got following message email: your script, drive migrator, has failed finish successfully. summary of failure(s) shown below. configure triggers script, or change setting receiving future failure notifications, click here. details: start function error message trigger end 4/22/15 1:56 pm processfilesandfolders exceeded maximum execution time time-based 4/22/15 2:02 pm sincerely, google apps script need help? visit google apps script documentation. please not reply message. (c) 2015 google i'm confused though because got email several hours prior saying "google drive copy-success" (i used drive migrator make backup copy of folder in drive)-- appears have copied got error message i'm not sure if need again because didn't finalize or what... please let me know whether backup success or if failed per error message. it depends on particular script ran, impossible answer if did full copy. happened script handles err

unicode - Reading a file in C as utf-8 and iterating through each character? -

how go reading file in c, iterating through each character can evaluate it? instance, give input file of: 5 ≠ 10 , evaluate 5 not equal 10, , print out false. can evaluation part, i'm unsure how approach reading unicode characters in c. i'm asking question, since i've written larger lexer, , want have support unicode, wanted try out on smaller-scale project see how goes. utf-8 encoding format unicode. you're interested in parsing text , separating out each byte. need calculate unicode code point determine character. ultimately need: a parser can distinguish utf-8 character boundaries. a translator convert data encoded utf-8 unicode code point. and reference list of code points , semantic meanings. the not equal sign unicode code point u+2260. encoded in utf-8 0xe2 0x89 0xa0. edit: should using library parsing utf-8 text. should focusing on finding code points relevant application, , interpreting meaning within application.

swift - What's the best way to log iOS crash errors and send them to the server? -

is there library logs crash errors , sends them server on next app launch? you should take @ crashlytics ( https://try.crashlytics.com/ ). it's excellent crash reporting tool, , it's easy set ;)

Apex/Oracle: When creating a new page, the tables I've created won't show up -

i creating application in oracle piece of coursework. i've been using few weeks , have come across issue; i need submit on friday, , it's mess, created new application , tried add new page, none of tables have created available choose... i've tried dropping previous tables , objects etc. , re-inserted in. sql queries etc work fine. of tables appear in sql browser. i've tried creating new application few times , trying different combinations of thing, no avail. i have searched , searched google , online oracle etc, no results i using universitys local oracle apex, happening on normal apex well.... any appreciated... freaking out due in less 2 days! after consulting 1 of lectures, informed me referencing object table, won't show on drop down list - need reference using sql instead

ios - Parse file images not loading to PFTableViewCell -

@iboutlet weak var itemimage: pfimageview! override func tableview(tableview: (uitableview), cellforrowatindexpath indexpath: (nsindexpath!), object: pfobject!) -> pftableviewcell? { var cell = tableview.dequeuereusablecellwithidentifier("pftableviewcell") as! itemviewcell! let items = object as! items let thumbnail = items.valueforkey("itemimage") as! pffile! cell.itemimage?.file = thumbnail return cell } when run this, pftableviewcontroller loads infinitely. commenting out: cell.itemimage?.file = thumbnail will load tvc there no images loaded. made every connection/outlet necessary function, in storyboard. the answer given throw error if trying show image in uiimageview within cell in tableview since have assigned instance of uiimage. to fix this, need assign uiimageview outlet .image shown below in line; cell.itemimage.image = image full solution works in test project below; if let pic = items.objectforkey(

ruby on rails - how to add a attribute value from the last row with another attribute value from current row -

basically have table has attributes: id, created_at, updated_at, user_id, email, debit, credit, , acctbal. use rails, , have add funds button on page has account history. if deposit 50.00 add new row in table , put 50 in deposit attribute keeping credit null. acctbal attribute null, cant figure out how add current credit value last row's acctbal value in table.i using ror. use same technique debit value. create method following there no computation acctbal because stuck. def create #@account = account.new(account_params) # @account.save # respond_with(@account) @account = account.new(account_params) @account.email = current_user.email @account.user_id = current_user.id respond_to |format| if @account.save format.html { redirect_to accounts_url, notice: 'thank , enjoy.' } format.json { render :show, status: :created, location: @account } else format.html { render :new } format.json { render json: @account.errors, status::unprocessable_entity } end

php searching in multidimensional array of unknown depth -

i try select data of array constructed json_decode() . in principle multiarray of unknown dimension. first of all, want search recursively value in array. next step want other values of upper dimension. here example: i search for: "2345" .... $json[3][6]['journal']['headline']="news" $json[3][6]['journal']['article']=2345 .... $json[8]['journal']['headline']="weather" $json[8]['journal']['article']=2345 .... after want value of element headline (returning "news" , "weather") it might element 2345 can found in different dimensions!!! someone recursiveiteratoriterator object, have hard time iterator objects, here robust system: <?php // traverse array , find // value while storing base key class recurselocator { public static $saved = array(); public static $find; public static $trigger; public stat

java - General questions about JavaEE security and JDBC realm authentication with WildFly 8.2 -

i'm studying chapters 47...50 of javaee 7 tutorial security, authentication, realms... server managed authentication totally new me, please patient. i created own jdbc realm (using wildfly 8.2) described @ paragraph 50.3 , of this beautiful article . i have general questions, hope can help: once user authenticated, need way retrieve identity within application. in 48.3.2 ( checking caller identity programmatically ) getremoteuser() method presented, paragraph says the security api described in section should used in less frequent situations in web component methods need access security context information. what mean? mean using methods kind of bad practice? there other way retrieve current user data i'm missing? what if perform operations when user successful logs in? there method triggered "user logged in" event? jdbc realm authentication implies user credentials read , checked server, application doesn't know coordinates auth-reserved

powershell - Rounding up a double to the nearest integer -

how can convert double int make sure rounds regardless of decimal value (as long decimal value not 0)? can use .net [math]::ceiling function , cast result [int] : ps > [int][math]::ceiling(1.1) 2 ps > [int][math]::ceiling(1.6) 2 ps >

c# - Observable sub property String to listbox binding -

sorry what's simple question. i have class appointment has various string properties. i have observable collection of them in view model, whenever bind of properties listbox returns every character first entry having it's own row sorry don't have code on hand, sum up сlass appointment { public appointment(string ыubject) { subject = subject; } public string subject { get; set; } } class appointments { public appointments() { listofappointments = new observablecollection<appointment>(); listofappointments.add(new listofappointments("example")); } public observablecollection<appointment> listofappointments { get; set; } } in xaml: <listbox datacontext="{staticresource appointementviewmodel, path=listofappointments}" itemsource="{binding subject }" /> hoping that correct. results listbox shows is e x m p l e i'm pretty clue less @ moment , not

struct - Using one typedef to use on two different data types in C? -

if have struct below, can use void ** pointer if don't know type of object point to? typedef struct { ... many other things defined here void ** pointer; }; if pointer array can either int or struct, possible encapsulate both in single typedef above? best solution can think of making 2 different typedefs, each accommodate either possibility: typedef struct { ... many other things defined here struct ** pointer_struct; int ** pointer_int; }; typedef struct b { ... same many other things defined here int ** pointer_int; }; or single struct accommodate both possibility either pointer_int or pointer_struct null: typedef struct { ... many other things defined here struct ** pointer_struct; int ** pointer_int; } ;

Using Flash and Swing w/ Java? -

i want create program able connect online flash game. need point me in right direction. i've done research , cannot find java integrated flash when it's online game. i want grab game client (which programmed in flash) , send login web requests server, grab cookies, log account in , display game on program. possible? here basic questions: will need source of flash game? are there imports include flash? my java limited of current, studying @ school , appreciated. i think should set webservice(soap or rest) between 2 application necessary data , forth...

javascript - How to get SERVER date using Ajax call? -

right trying date of local host. ajax request not working successfully. how do it? html code: has ajax code in script tag. <!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> <script language=”javascript” type=”text/javascript”> function ajaxfunction() { var xh; try { // firefox, opera 8.0+, safari xh=new xmlhttprequest(); } catch (e) { alert("your browser not support ajax!"); } xh.onreadystatechange=statechanged; xh.open("get","19_time.php",true); xh.send(null); tt=timer_function(); } function statechanged() { if(xh.readystate==4) document.getelementbyid(&quo

java - Select Randomly an object from a list (Image) -

guys wondering if way put list of example jlabels, , method select randomly 1 of them. and if jlabels images still work?? thanks answers;) yes it's possible: random r = new random(); list<jlabel> yourlist; //populate list beforehand. yourlist.add(jlabel blah); , on jlabel randomjlabel = yourlist.get(r.nextint(yourlist.size()));

mysql - PHP query keeps failing -

<html> <head> <title>inserts</title> </head> <body> <h1>adding user</h1> <form action="insert1.php" method="post"> gamertag:<br /> <input name="insertfield1" type="text"> <br /> bio:<br /> <input name="insertfield2" type="text"> <br /> membership:<br /> <input name="insertfield3" type="text"> <br /> gamerscore:<br /> <input name="insertfield4" type="number"> <br /> email:<br /> <input name="insertfield5" type="text"> <br /> name:<br /> <input name="insertfield6" type="text"> <br /> location:<br /> <input name="insertfield7" type="text"> <br /> friend:&l

ruby - Does #{}-style substitution work in ERB expressions? -

this question has answer here: what #{…} mean? 3 answers i'm adding confirmation dialog delete operation in rails tutorial, , want include text object deleted. tried this: <%= link_to 'delete', article_path(article), method: :delete, data: { confirm: 'really delete blog "#{article.title}"?' } %> the substitution not happen: resulting dialog says really delete blog "#{article.title}"? . i've changed use format strings , it's working fine: <%= link_to 'delete', article_path(article), method: :delete, data: { confirm: 'really delete blog "%s"?' % article.title } %> the substitution happens: resulting dialog says really delete blog "of cabbages , kings"? what change make more-readable "#{article.title}" work me? what's difference? the reason

asp.net mvc - How to load HTML page in MVC 5 for Angularjs routing? -

i want use spa concept of angularjs in mvc 5, cant handle routing. want main page view in razor , load portion of page using angularjs. know description not sufficient hope me through. in advance. look @ project template angularstart https://visualstudiogallery.msdn.microsoft.com/cc6c9c5f-2846-4822-899f-a6c295cd4f2b i author of template , shows how can client side routing , mvc routing can combined. has been created mvc 4, idea. i created blog post http://blog.technovert.com/2013/12/setting-up-angularjs-for-asp-net-mvc-n-webapi-project/ explaining approach.

java - How to save an image in a set location? -

i trying save resized picture user's desktop not sure how that. here's code far: mi.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { string userhome = system.getproperty("user.home"); filechooser = new jfilechooser(userhome + "\\desktop"); filechooser.setautoscrolls(true); switch (filechooser.showopendialog(f)) { case jfilechooser.approve_option: bufferedimage img = null; try { img = imageio.read(filechooser.getselectedfile()); } catch (ioexception e1) { e1.printstacktrace(); } image dimg = img.getscaledinstance(f.getwidth(), f.getheight(), image.scale_smooth); path = new imageicon(dimg); configprops.setproperty("path", filechooser

html - Google chrome showing font much lighter -

Image
im running website fonts lighter in chrome browser @ same time when run same website in browser firefox,the webpage displayed better below : pic 1 : chrome pic 2 : firefox why happen ? do have disable / enable plugins view better ? chrome extensions : plugins : fiddle body { color: #222; font: 14px/19px roboto, sans-serif; font-weight: 400; letter-spacing: .1; padding: 0 10px; } thank you

ruby on rails - Using PG for ROR -

i using pg in application here database.yml file default: &default adapter: postgresql pool: 5 timeout: 5000 development: <<: *default database: testing_development # warning: database defined "test" erased , # re-generated development database when run "rake". # not set db same development or production. test: <<: *default database: db/test.sqlite3 production: <<: *default database: db/production.sqlite3 when ran rake db:create got: pg::syntaxerror: error: syntax error @ or near "." line 1: create database "db/test"."sqlite3" encoding = 'utf8' ^ : create database "db/test"."sqlite3" encoding = 'utf8' how fix this? when running rake db:create , tries create databases you, need name test , production databases properly. database names can't contain periods. i.e., if application name testing : tes

object detection - OpenCV GPU support and TBB -

i going train haar classifier flowers(which highly skeptical about). have been following codingrobin tut everything. http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html now, has been emphasized use gpu support, multithreading etc. otherwise training gonna take days. going use pre-built libraries , therefore pre-built opencv_traincascade utility. i want ask beforehand, able leverage gpu support if use pre-built libs, given install cuda? tbb fit in whole picture? recommend me building whole library scratch tbb , cuda support checked, or waste? note : using opencv 2.4.11 . , complete beginner opencv.

Extension method in c# -

this question has answer here: what advantages of extension methods have found? [closed] 30 answers what difference between following 2 implementaion,if no difference why need extension methods ? ( public static list<tsource> tolist<tsource>(this ienumerable<tsource> source );) 1.ienumerable<student> myextension = mtystudent; // "mtystudent colletion" myextension.tolist(); 2.list<student> mystudent= enumerable.tolist(myextension); there no difference. call same method either way. enumerable.tolist<tsource>(this ienumerable<tsource> source) extension method. static method in enumerable class, can call instance method. extension methods really.

xml - Error getting Python script to run on older version -

i had tested web based application uses python (2.7.8) scripts create dynamic content. i parsing xml data , performing several operations on it. one of operations requires searching type of data uses findall(xpath) function elementtree . now place need deploy linux box has older version of python (2.6.6). i had trouble due older elementtree not having capabilities. i followed elementtree syntaxerror: expected path separator ([) . copied elementtree 2.7.8 new box , imported there. it imports fine different error follows: traceback (most recent call last): file "./filename_python.py", line 117, in <module> ch in child.findall(xpath): file "/usr/lib64/python2.6/xml/etree/elementpath.py", line 293, in findall return list(iterfind(elem, path, namespaces)) file "/usr/lib64/python2.6/xml/etree/elementpath.py", line 194, in select if "".join(e.itertext()) == value: attributeerror: itertext i cannot update py

ios - Number cells for UITableView -

i trying number cell 0-x uitableview. using label , want labels text 0,1,2,3,4,...x. //label cell let cellframe: cgrect = cgrectmake(0, 0, 90, 32) var celllabel = uilabel(frame: cellframe) celllabel.textalignment = .center celllabel.font = uifont.mdfont.regularfourteen celllabel.text = ("\(indexpath.row)") i have tried approach , 0,1,2,3,4 when scroll prints 0,1,2,3,4 on top of other numbers well. this whole code function func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { var cell: uitableviewcell = tableview.dequeuereusablecellwithidentifier("cell") as! uitableviewcell if cell == null { //label cell let cellframe: cgrect = cgrectmake(0, 0, 90, 32) var celllabel = uilabel(frame: cellframe) celllabel.textalignment = .center celllabel.font = uifont.mdfont.regularfourteen celllabel.text = ("\(indexpath.row)")

In Kilo code release, nova boot failed on keystoneclient with 500 error -

i have kilo rc1 installed on centos7 following rpm pkgs. # rpm -qa | grep -ei 'nova|urllib3|request|six' requests-2.6.0-1.noarch python-novaclient-2.23.0.post13-1.noarch nova-2015.1.0rc1-1.noarch six-1.9.0-1.noarch nova-docker-0.0.0.post183-1.noarch urllib3-1.10.1-1.noarch keystone, glance , neutron work expected plus nova method such nova service-list. password , configuration files have been verified. when issuing nova boot cmd, got http 500 error detailed below. --- token neutron/password ---- # openstack token issue +------------+----------------------------------+ | field | value | +------------+----------------------------------+ | expires | 2015-04-22t21:12:14z | | id | 24e6a5e2546c41c98865c946f10f7ddb | | project_id | 0ece3f1cc56a4a0bba1906b43d1faceb | | user_id | ef18eea137ed4dabad1f92f4a393fd70 | +------------+----------------------------------+ -------------- used issued token call nova api --------------- # curl -g -i -x http://10.0.0.244:8774/v2/0ece

sql server - Case in SQL join statement -

i have use conditional statement in join: select * inner join b on a.id = b.id if b.id null or b.id = '' or a.id null or a.id = '' should a.name = b.name , instead of a.id = b.id i have use conditional statement in join: select * inner join b on a.id = b.id if b.id null or b.id = '' should a.id2 = b.id2 instead of a.id = b.id . is correct if this: select * inner join b on (b.id not null , b.id <> '' , a.id not null , a.id <> '' , a.id = b.id) or ((b.id null or b.id = '' or a.id null or a.id = '') , a.name = b.name) i think want this: select * inner join bid on (bid.id not null , bid.id <> '' , a.id not null , a.id <> '' , a.id = bid.id) inner join bname on ((bname.id null or bname.id = '' or a.id null or a.id = '') , a.name = bname.name) that join on b table twice, 1 join when id not null , second join when id null ,

c# - Pagination or navigation control in Windows Phone 8.1 app -

Image
i developing windows phone 8.1 app i have define navigation path on top of every page. path grow, size not fit screen. searching control shorttern path please refer below image any appreciated thanks you can write own converter truncates string given maximal length public class maxstringconverter : ivalueconverter { public maxstringconverter() { replacechars = "..."; maxlenght = int.maxvalue; } public int maxlength { get; set; } public string replacechars { get; set; } public object convert(object value, type targettype, object parameter, string culture) { string val = (string)value; int replacecharlength = replacechars.length; if(val.lenght > maxlength ) { int middle = val.lenght / 2; int textlenth = maxlength - 2 * replacecharlength; string texttoreturn = val.substring(middle - replacecharlength , textlenth); return string

javascript - Hiding specific elements after creating them with ng-repeat -

i'm trying create piano on page using 2 image files: white-key , black-key. i've created them, black keys on piano alternate in groups of 2 , 3 , i'd hide black key images indices [1, 4(1+3), 8(4+4), 11(8+3), 15(11+4), .., 54]. i'm unsure of how go doing though. this how created them. html: <div ng-controller="drawctrl draw"> <ul class="white-keys"> <li ng-repeat="t in draw.range(56) track $index"> <img ng-src={{draw.white_key}} /> </li> </ul> <ul class="black-keys"> <li ng-repeat="t in draw.range(55) track $index"> <img ng-src={{draw.black_key}} /> </li> </ul> </div> js: angular.module('app') .controller('drawctrl', function() { var self = this; self.pi

Can same variables be used both on Android and iOS? -

i'm not mobile developer , searching google didn't provide me definitive answer, question is: can use same variables, like: "foo %1$d bar %2$s" bot in android , ios? context: use same language file base.

javascript - extjs 5, deine dropzone on gridpanel, but cannot drop, why? -

i want drag pic , drop gridpanel. definde gridpanel , code below, viewconfig: { listeners: { render: 'onplaylistgridviewrender' } }, onplaylistgridviewrender: function(component, eopts) { var gridview = component, grid = gridview.up('playlistgridpanel'); grid.dropzone = ext.create('ext.dd.dropzone', component.el, { notifydrop: function(source, e, data){ return true; } }); } i drag pic , when mouse on grid, icon shows dropping forbidden. what's wrong here? thanks. both dragged picture , drop target (the grid) must in ddgroup .

can i pass Values from Active Directory to Outlook Profile? -

Image
i'm trying automate creation of outlook profile per user in our company. can tell prf file necessary values ad? ex. values "displayname" "logonname" declared in ad , if possible i'm going implement thru gpo. no, free retrieve data ad explicitly in code , build prf file self.

javascript - Problems using Parse.Cloud.httpRequest with Express, says no such method for success: -

i'm hitting facebook graph search url, in parse express. call made parse.cloud.httprequest . i 500 internal server error response, , when in logs see: an error saying httprequest has no method named success: (even though code i'm using based right off examples on parse.com). the basic json data there retrieved error has prevented function completing. here's code, tips appreciated: // these 2 lines required initialize express in cloud code. var module = require('cloud/jsonml.js'); var buffer = require('buffer').buffer; var express = require('express'); var app = express(); // global app configuration section app.set('views', 'cloud/views'); // specify folder find templates app.set('view engine', 'ejs'); // set template engine app.use(express.bodyparser()); // middleware reading request body app.get('/hello', function(request, response) { parse.cloud.httprequest({

Set JavaScript file to a variable in PHP -

okay i'm trying set javascript document variable in php? essentially i'm setting wifi speed calculate in javascript document variable,so can save variable value in database other information instance. the javascript code pretty long don't know if should copy whole code in , set equal variable or if there's syntax set variable. i've seen: <script type="text/javascript" src="file.js"></script> online calling javascript file not sure how value , store in variable. you $js = file_get_contents( 'http://www.example.com/javacsript.js'); $value = trim( str_replace( array( "document.write('", "');"), '', $js)); echo $value; hope you

amazon web services - PHP ftp_connect() returns false -

$ftp_host = "letsassist.biz"; $ftp_user_name = 'username'; $ftp_user_pass = 'mypassword'; $port = 21; $connect_it = ftp_connect( $ftp_host,$port ); if($connect_it){ echo "connect"; }else{ echo "not connect"; } when try run code in localhost echo "connect" , when try run remote server (aws ec2) echo "not connect" . any solution please.

c# - Opening multiple windows with Kendo menu -

i have kendo menu , i'd each menu open new window. how can achieve that? this current code in _layout : <div class="k-rtl"> @(html.kendo().menu() .name("menu") .items(items => { items.add().text("menu 1").items(child => { child.add().text("1").linkhtmlattributes(new { onclick = "menu('1');" }); child.add().text("2"); }); }) ) </div> <script> function menu(text) { var window = $("#win1").data("kendowindow"); switch (text) { case "1": window.refresh({ url: "@url.action("index", "1")" }).title("1"); break; case "2": window.refresh({ url: "@url.action("index", "2")" }).title("2"); break; } window.open(); } </script> and

How to save entered strings and integers in C -

can me on code. should when enter "create 6 5" supposed create 6x5 rectangular shape *'s, not show yet unless entered "show". this code i'm working on, not correct yet, still figuring out how it. i'm new in programming. char s[100]; char *s1 = "show"; char *s2 = "create"; int main() { int zwidth = 0, zheight = 0, zloop = 0, aloop = 0; { scanf("%s %d %d", &s, &zwidth, &zheight); } while (strcmp(s1, s) != 0); if(strcmp(s2, s) == 0) { //to draw first horizontal line for(zloop = 0; zloop < zwidth; zloop++) printf("*"); printf("\n"); //drawing vertical lines for(zloop = 2; zloop < zheight; zloop++) { printf("*"); for(zloop = 0; aloop < zwidth-2; aloop++) printf("*"); printf("*\n"); } //last horizontal line for(zl

c++ - Weird linker error undefined reference to vtable -

i have class no virtual function, class contains class, here definitions: class storagemanager : public qobject { q_object protected: class abstractwrapper { public: virtual void action1() = 0; virtual void action2() = 0; virtual void action3() = 0; virtual ~abstractwrapper() {} }; class abstractstorage { public: virtual qsharedpointer<abstractwrapper> getwrapper(qstring key) = 0; virtual qsharedpointer<abstractwrapper> newwrapper(qstring key) = 0; virtual void deletewrapper(qstring key) = 0; virtual ~abstractstorage() {} }; template<typename t> class wrapper { public: virtual void action1() { /* stuff */ } virtual void action2() { /* stuff */ } virtual void action3() { /* stuff */ } virtual ~wrapper() {} private: t * realcontent; }; template<typename t> class storage { public: virtu

if statement - R: dplyr pipe conditional lead/lag using ifelse with unexpected behavior -

i'm trying use conditional lead / lag function in dplyr pipe using ifelse getting error. however, using same approach outside pipe seems work. missing? require(dplyr) data: test <- data.frame(a = c("b","b","b","b","b","b", "m","m","m","m","m","m", "s","s","s","s","s","s"), b = replicate(1,n=18), stringsasfactors=f) dplyr pipe: test %>% mutate(delta = ifelse(a == "s", b + lag(b, n = 2*6), ifelse(a == "m", b + lag(b, n = 1*6), 0))) # error: not convert second argument integer. type=langsxp, length = 3 without pipe works: test$delta <- ifelse(test$a == "s", test$b + lag(test$b, n = 2*6), ifelse(test$a == "m&q

How to extract a frame from video using Java -

is there solution "extract frame video file in java using core library without importing external libraries"? say saw image , bufferedstrategy , buffercapabilities in java awt libraries. the java media framework api ( jmf ) enables audio, video , other time-based media operations, without use of third party library. seeking frames inside movie jmf . xuggler third party library, used.

How to send email by using Exchange server in Classic ASP? -

i migrating classic asp application new server, smtp server not allowed in new server, can give me tips how send email via exchange server? classic asp's cdosys component has remote server parameter use send emails via exchange server on port 25. <% set mymail=createobject("cdo.message") mymail.subject="sending email cdo" mymail.from="mymail@mydomain.com" mymail.to="someone@somedomain.com" mymail.textbody="this message." mymail.configuration.fields.item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 'name or ip of remote smtp server mymail.configuration.fields.item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.server.com" 'server port mymail.configuration.fields.item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 mymail.configuration.fields.update mymail.send set mymail=nothing %>

angularjs tree directive with filter -

good day. made tree directive filter . want see tree-node if name or child name contains word. so, works when filter data in controller: $scope.data1 = $filter('treename')($scope.data, $scope.name); <tree model="data1"/> but when add filter | treename: name in model expression <tree model="data | treename: name"/> angular cause lot of exceptions on interaction error: [$rootscope:infdig] http://errors.angularjs.org/1.3.15/$rootscope/infdig?p0=10&p1=%5b%5b%7b%22m…r%20e%3da(c%2cd)%3breturn%20b(e%2cc%2cd)%7d%22%2c%22newval%22%3a1%7d%5d%5d also setselected never called. doing wrong? http://plnkr.co/edit/6boren9tht5bezmkfys9?p=preview

database migration - In git how to find out which files were added after a specific tag? -

i maintain database migration sql script files. i tag commits git tag. suppose have tags 1, 1.1, 1.2, 1.3 i want modify (db migration sql script) file when no tag added repo after file created. how can find out? if file created , (version) tag added dont want modify sql migration script, instead add totally new sql file helps me want. you can use git diff grepping follows: git diff --name-status your-tag..head | grep ^a this means: "get me differences between your-tag , head , showing file name , status (added, modified, deleted, created). " the grep filters files have been added, --name-status indicates beginning line uppercase "a".

Java - compilation error debug -

i have compilation error can't seem fix. gives me message type mismatch: cannot convert object list. below have added methods says error in. // read books file public void readbooksfromfile() { if(booksdatabase != null && !booksdatabase.isempty()) { try (objectinputstream input = new objectinputstream(new fileinputstream(booksdatabase))) { books = input.readobject(); // error here } catch (ioexception e) { e.printstacktrace(); } } } the second method public listbook(string booksdatabase) { this.booksdatabase = booksdatabase; readbooksfromfile(); // error here } the third method public static void main (string[] args){ // creates listbook object keep track of books in library listbook lb = new listbook("books.dat"); // error here // add books listbook object lb.addbook(new book("e-commerc

iOS camera: manual exposure duration but auto ISO? -

i'm using camera video feed image processing , optimise fastest shutter speed. know can manually set exposure duration , iso using setexposuremodecustomwithduration:iso:completionhandler: but requires 1 set both values hand. there method or clever trick allow set exposure duraction manually have iso handle try correctly expose image? i'm not sure if solution best one, since struggling were. i've done listen changes in exposure offset and, them, adjust iso until reach acceptable exposure level. of code has been taken apple sample code so, first of all, listen changes on exposuretargetoffset. add in class declaration: static void *exposuretargetoffsetcontext = &exposuretargetoffsetcontext; then, once have done device setup properly: [self addobserver:self forkeypath:@"capturedevice.exposuretargetoffset" options:nskeyvalueobservingoptionnew context:exposuretargetoffsetcontext]; (instead of capturedevice, use property device) implement i

java - What's the default access modifier for local class members? -

meaning if ommit access modifier members of local classes, can class declaring method access members? , else exactly? i'm talking local classes, classes defined inside method therefore not duplicate the default modifier package level modifier. accessable inside package.

javascript - CORS error in AngularJS -

when using fiddler or browser side http client extension advanced rest client, can data api easily. when try use same api angular js, cors issue appear immediately. have tried following lines solve problem in angularjs, unfortunately did not work. appd.config(function ($httpprovider) { // $httpprovider.defaults.headers.post['content-type'] = 'application/x-www-form-urlencoded'; // $httpprovider.defaults.headers.post['accept'] = '*/*' $httpprovider.defaults.usexdomain = true; $httpprovider.defaults.withcredentials = true; delete $httpprovider.defaults.headers.common["x-requested-with"]; $httpprovider.defaults.headers.common["accept"] = "*/*"; $httpprovider.defaults.headers.common["content-type"] = "application/x-www-form-urlencoded"; $httpprovider.defaults.headers.common['authorization'] = 'basic encodedpassword='; }); i following error in mozilla:

parallel processing - Mandelbrot optimization in openmp -

well have paralellisize mandelbrot program in c. think have done , cant better times. question if has idea improve code, ive been thinking perhaps in nested parallel regions between outer , insider for... also have doubts if more elegant or recommended put pragmas in single line or write separate pragmas ( 1 omp parallel , shared , private variables , conditional, , pragma omp , schedule dynamic). ive doubt if constants can used private variables because think cleaner have constants instead of defined variables. also have written conditional ( if numcpu >1) has no sense use parallel region , make normal sequential execution. finally have read dynamic chunk depends on hardware , system configuration... have left constant, can changed. also adapt number of threads number of processors available.. int main(int argc, char *argv[]) { omp_set_dynamic(1); int xactual, yactual; //each iteration, calculates: newz = oldz*oldz + p, p current pixel, , oldz stars @

ios - iTunes connect -cant add a new app? -

we used add new apps going "apps" tap "+" button, , menu should open says- add new ios app . now, when hit "+" button , see create bundle option . all contracts ok, why happen ? go developer account homepage , check if notification pending such sign agreement(s). because type of issue caused non-signed agreement(s).

android - windows - building tess-two with ndk -

i working on windows i want use open source tess-two project image processing in android application - https://github.com/rmtheis/tess-two . now, according tutorial - http://gaut.am/making-an-ocr-android-app-using-tesseract/ need build tess-two ndk-build. where right now: i downloaded ndk , run installer, , have android-ndk-r10d folder - here https://developer.android.com/tools/sdk/ndk/index.html . also downloaded zip file https://github.com/rmtheis/tess-two extracted folder . my question - do need else (besides ndk-build script) in order build tess-two project , import eclipse? what exact steps? i read cygwin.. need it? any appreciated! to compile tess-two library, you'll need following: android ndk tools( https://dl.google.com/android/repository/android-ndk-r14-windows-x86_64.zip ) a build of android build tools android.bat working(preferably one: https://dl.google.com/android/repository/tools_r25.2.3-windows.zip ) apache ant( http://mirr

loops - How to store string increments as a concatenated String? -

scanner input = new scanner(system.in); string userinput = input.nextline(); string letterarray[] = new string[userinput.length()]; for(int = 0; < userinput.length(); i++ ){ letterarray[i] = userinput.substring(i, i+1); } for(int j = userinput.length()-1; j>=0; j--){ system.out.print(letterarray[j]); } i have stored users input want reverse have inputted , store reversed form string. i have managed display string superposition of each letter increment has been stored in array, how go storing reversed form string? if want print reverse can that: scanner input = new scanner(system.in); string userinput = input.nextline(); for(int i=1;i<=userinput.length();i++){ system.out.print(userinput.charat(userinput.length()-i)); } other if wanto turn string array can use simpler methods like: string[] letterarray = userinput .split(""); if want store array or new string can this: scanner inpu