Posts

Showing posts from April, 2011

android - Display a lisView on mapView -

Image
i want display listview on mapview in below image of google maps app. initially map visible. when user clicks on tab want listview appear on mapview. but problem using below layout not display maps(gray screen visible). however, listview displayed. layout : <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/pickmatcheslayout" android:layout_width="match_parent" android:layout_height="match_parent" > <tabhost android:id="@+id/tabhost" android:layout_width="match_parent" android:layout_height="match_parent" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <tabwidget ...

c++ - Convert Vector<int> to String -

i want make program first input array of string, convert integer, , push vector. the code : string a; vector<long long int> c; cout << "enter message = "; cin >> a; cout << endl; cout << "converted message integer = "; (i=0;i<a.size();i++) { x=(int)a.at(i); cout << x << " "; //convert every element string integer c.push_back(x); } the output : enter message = haha converted message integer = 104 97 104 97 then write in file, , on next program want read back, , convert string, question how that? convert vector [104 97 104 97] string "haha". i appreciate helps. thanks. std::vector<int> data = {104, 97, 104, 97}; std::string actualword; char ch; (int = 0; < data.size(); i++) { ch = data[i]; actualword += ch; }

hierarchical data - Finding all parents in mysql table with single query on some condition -

next sql working: select t2.id, t2.name ( select @r _id, (select @r := idparent objects id = _id) parent_id (select @r := 10) vars, objects m @r <> 0) t1 join objects t2 on t1._id = t2.id but can find id doing query: select id objects lower(name) lower('%prod%') tell me how combine these queries

android - how to draw my custom view on GridView? -

i have created custom view displaying letter in fill circle. example circle filled green , letter on red. now want draw several custom views in gridview. example if gridview 5x5, you'll see 25 custom views on screen (and maybe each custom view has different letter) anyone know this? thank help edit #1: custom view package com.hoangtrinh.paintmycustomview; import android.content.context; import android.content.res.typedarray; import android.graphics.canvas; import android.graphics.paint; import android.graphics.paint.style; import android.util.attributeset; import android.view.view; public class letterview extends view { private int letterbackgroundcolor, lettercolor; private string lettertext; private paint myletterpaint; public int getletterbackgroundcolor() { return letterbackgroundcolor; } public void setletterbackgroundcolor(int letterbackgroundcolor) { this.letterbackgroundcolor = letterbackgroundcolor; invalidat...

javascript - Implementing protection for source images -

Image
while browsing came across link as can see image protected, if browse cars-database.com take source image , same message. this first time see , wonder how has been implemented? know? screenshot of protected source image: here's simple example on how implement similar in nginx : location ~ \.(jpe?g|png|gif)$ { valid_referers none blocked mysite.com *.mysite.com; if ($invalid_referer) { rewrite ^ http://mysite.com/lowres$request_uri permanent; } }

c++ - Boost.Spirit SQL grammar/lexer failure -

i have 2 problems following sql grammar: #define boost_spirit_qi_debug #include <boost/spirit/include/qi.hpp> #include <boost/spirit/include/lex_lexertl.hpp> #include <boost/spirit/include/phoenix.hpp> #include <boost/spirit/include/karma.hpp> #include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/std_pair.hpp> #include <boost/algorithm/string.hpp> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> #include <boost/lexical_cast.hpp> #include <iostream> #include <fstream> #include <string> #include <set> #include <utility> namespace bs = boost::spirit; namespace lex = boost::spirit::lex; namespace qi = boost::spirit::qi; namespace phx = boost::phoenix; // token definition base, defines tokens base grammar below template <typename lexer> struct sql_tokens : lex::lexer<lexer> { public: // tokens no attributes. lex::token_def<lex...

php - Update/Change all ID in PhpMyAdmin (MySQL) -

i've got problem joomla migration (kunena forum component) when try copy old forum table new one, receive "duplicate error" message. a simple solution must change values in id column. the table now: id | name 1 | foo 2 | bar etc... can add numbers "20" every rows? result be: id | name 201 | foo 202 | bar etc... thanks! update `table` set `id` = concat('20', `id`);

Rails query with more than two join -

i need join , results 3 table in json format @employee = employee.joins(:salary,:personal_info).select("salary.*,personal_info.*) --> works fine @employee = employee.joins(:salary,:personal_info,:loan).select("salary.*,personal_info.*,loan.*) --> salary , personal_info coming format.json { render json: @employee, serializer: employeeserializer, :root => 'employee'} try providing raw sql, @employee = employee.joins('inner join salary on salary.employee_id = employee.id inner join personal_info on personal_info.employee_id = employee.id inner join loan on loan.employee_id = employee.id')

facebook fql - FQL: Retrieve the original (parent) post id from a comment via the notifications table -

maybe total idiot, have been looking high , low answer reading fql api, searching interwebs , cannot find answer question. i querying notifications table identify when comments on post user has made. i'm trying query original post create thread of conversation in app. cannot figure out how id of the original (parent) post. i've tried stream table, comments table, nothing can find return me id of original post comment in reply to. this has possible (and obvious). need id of original post comment from. any appreciated. thanks! assume have comment id in format xxxxxxxx_yyyyy fql easiest way post id select parent_id,post_id comment id = 'xxxxxxxx_yyyyy' for graph api bit tricky because facebook doesn't provide post id information you. xxxxxxxx in comment id xxxxxxxx_yyyyy object id post. assume page id zzzzzzzz . if want know post id of comment id xxxxxxxx_yyyyy . post id graph zzzzzzzz_xxxxxxxx ( [page id]_[post id] ) but: comment id c...

android - myView.getHitRect() returns coordinates in realation to parent. How to get them in relation to the grandparent? -

i using following code create touch delegate of view. problem view clickable area want increase inside of narrow linearlayout. below code can increase clickable area of view, in scope of narrow linearlayout. pass function not parent grandparent of myview (myview.getparent().getparent()). it's relativelayout has space bigger clickable area. touchrect pointing in wrong place , touchdelegate position incorrectly.. because: delegate.gethitrect(touchrect); returns position in relation parent, not grandparent (or parent of parent). public static runnable gettouchdelegateaction(final view delegate, final view parent, final int toppadding, final int bottompadding, final int leftpadding, final int rightpadding) { return new runnable() { @override public void run() { // construct new rectangle , let delegate set values rect touchrect = new rect(); delegate.gethitrect(touchrect); // modify dimensions of rect...

hive - Providing access to unstructured files in Hadoop -

so have collection of files archived in hdfs unique key in file-name. have table of records in hive table same unique key. how provide access files other users? may need restrict access users. i thinking of providing reference files in hive table. i @ sort of web interface searching downloading files. hive kicks off mapreduce job (or several) every time execute query. latency introduced setting , tearing down mapreduce job(s) exceeds acceptable standards responsivness expected web interface. i recommend keep metadata files in relational database. have have relational database, postgresql, store hive metadata. sure hope not using default derby that!

windows 7 - Getting message as Hyper-V has not been installed -

Image
i'm new using virtual machines. i'm using windows 7 enterprise os. have enabled hyper-v in machine. when run hyper-v manager , tried connect local machine, shown message follows how resolve this? hyper-v isn't available on windows 7 client skus, enterprise. it's available on windows server 2008 x64 (some skus), windows server 2008 r2 (most skus), windows 8 professional x64, windows 8 enterprise x64, , windows server 2012 (again, skus). you've installed management tools allow manage remote instance of hyper-v.

cordova - If i am having the 5 pages with 5 controllers in angularjs -

hi having 5 pages 5 controllers , using 1 service using injection in every controller . possible without editing code in views , controllers stop services functionality writing code anywhere once in of 1 view or controller ? example having app uses server retrieve data , can writing simple code restrict service instead of server can access localdata ? all angular services application singletons. means, can change state of service once, , change 'visible' it's users. the service gets instantiated when application ask it. while service exists, controllers, etc. receive reference same service instance (i still expect service garbage collected when references service lost). this means, after initialize service, controllers can invoke methods, etc. - on same instance, visible other instances. here's jsfiddle showing concept. when value in factory object changed in 1 controller, visible throughout application. both controllers use modified value of test...

javascript - Can anyone tell me why I am getting Uncaught SyntaxError: Unexpected string? -

this code below. the error above not move, trying lots of different variants. var $token = $(this).attr('id'); var $itemid = $(this).find('input.id').val(); var $instaurl = 'https://api.instagram.com/v1/media/"'.$itemid.'"/likes?access_token="'.$token.'"'; console.log($instaurl); thanks javascript uses + string concatenation: var $token = $(this).attr('id'); var $itemid = $(this).find('input.id').val(); var $instaurl = 'https://api.instagram.com/v1/media/"'+$itemid+'"/likes?access_token="'+$token+'"'; console.log($instaurl); you used dot ( . ) php. by way, not need use dollar sign variables in javascript!

javascript - How to hook one event for block with many elements -

i have markup: <fieldset class="checkbxr full small" onclick="alert('test')"> <label for="" class="fat_label">category</label> <input type="checkbox" name="true_checkb" id=""> <span class="dmy_checkb"></span> </fieldset> this dummy checkbox solution. ok, need hook 1 onclick event whole fieldset . if below have 3 alerts, of elements inisde, event fires 3 times. how set fieldset , make 1 event call? thx help. this fiddle js , css: http://jsfiddle.net/vet6y/ you need cancel event bubbling depending on clicked.... here script (in pure javascript - easier in jquery - can check if there class on event source example , cancel then). script checks if tag clicked fieldset, if not cancels bubble, if pops alert. fiddle http://jsfiddle.net/yk3tu/2/ code: html: <fieldset class="checkbxr full small" onclick="javas...

scala - Grouping Play 2.0 views into packages/folders -

i'm trying solve possibly simple problem, in 'views' directory, in typical play framework setup, group templates (*.scala.html files) groups, possibly using folder each group, eg. have customers folder following files in it: createform.scala.html editform.scala.html list.scala.html so far when try access view reference controller (eg. ok(views.html.list(..)) -> ok(views.customers.html.list(...) ), error: object customers not member of package views is there best practice/receipe on how work multiple views, how gather them groups , how use them in other views or controllers. thx in advance. the way template engine works template defined as: /views/application/index.scala.html will turned class: views.html.application.index so views.html kept prefix. cf. play template documentation . in case means should ok(views.html.customers.list(...))

c - pointer to an array of pointer to functions -

i f point array of f_pointer_type. did miss here ? i'm getting error 'lvalue required left operand of assignment'. mean ? #include <stdio.h> typedef char* (*f_pointer_type)(); char * rethello() { return "hello"; } int main() { char (* ( *f())[])(); //declare f pointer array of pointers function gets nothing , return char. f_pointer_type funcs[3]; //an array of pointers function gets nothing , returns pointer char f = &funcs; //error : lvalue required left operand of assignment return 0; } if read clockwise/spiral rule see f function returning pointer array of pointers functions returning char* . in other words it's function prototype , not variable declaration. try instead: f_pointer_type (*f)[];

shell - How to make stderr of OS commands ran with "!" go to Sql*plus spool? -

background i have long sql*plus script reason needs run unix commands using exclamation mark syntax. i write spool in order have log file @ end of process. the problem if os command fails, stderr lost , doesn't go spooled file. example code spool mylog.txt !echo alter user xxx identified yyyy; alter user xxx identified yyyy; !echo cp file1 folder1/ !cp file1 folder1/ !echo alter user yyy identified xxx; alter user yyy identified xxx; !echo cp file2 folder2/ !cp file2 folder2/ spool off if 1 cp fails, wouldn't know looking @ mylog.txt obviously doing !cp file1 folder1/ &> mylog.txt mess log beeing spooled in unpredictable ways. question what can done in order the stderr of unix commands writen file beeing spooled ? update i tried lc.'s suggestion, appending 2>&1 @ end of every cp command in order redirect stderr stdout this: enter value 1: update 2 set define off made not prompt value. allowed me discover it's not st...

c# - Class file doesn't compile outside of App_Code folder -

i using visual web developer express 2010 edition. have chosen "new website" (and not new project) build website. project targeted .net 2.0 i have class file created under app_code folder. instantiated object of class in default.aspx.cs myclass m = new myclass(); this compiles fine. however, moment deploy on remote iis server, gives compilation error when invoke remote website browser. error cs0246: type or namespace name 'myclass' not found (are missing using directive or assembly reference?) so found question here - the type or namespace name 'lad' not found (are missing using directive or assembly reference?) it says shouldn't put class file app_code directory. asks put in diff place , set build action (in properties) compile. couldn't find build action in properties in "ms visual web developer 2010" - had skip step. so deleted app_code , recreated in root folder. default.aspx.cs doesn't compile @ - gives now p...

c# - Get project path from POCO migration Seed() -

i'm trying executable path within seed() thread. i'm not getting values want. aim enumerate files within executable path, , work those; internal sealed class configuration : dbmigrationsconfiguration<dbcontext> { public configuration() { automaticmigrationsenabled = true; } protected override void seed(dbcontext context) { // list of files var sqlfilelist = directory.getfiles(system.reflection.assembly.getentryassembly().location); } } output package manager console; object reference not set instance of object. i'm expecting; c:\development\my.domain you should use system.reflection.assembly.getentryassembly().location note return path of process exe. you'll have use system.io.path.getdirectoryname(path) path of directory containing process exe. for msdn : getcallingassembly => assembly of method invoked executing method. getexecutingassembly => assembly contains code exe...

sql - Convert mm/dd/yyyy to yyyy-mm-dd in Oracle -

the date column have in varchar2 , want convert values in yyyy-mm-dd date 7/26/2013 7/29/2013 8/1/2013 8/4/2013 7/28/2013 7/31/2013 8/3/2013 7/30/2013 8/5/2013 7/25/2013 8/2/2013 8/6/2013 7/27/2013 you should never store dates in varchar column so in order display differently now, need first convert string date , string if "dates" have right (and same) format, following should work: select to_char(to_date(date, 'mm/dd/yyyy'), 'yyyy-mm-dd') the_table; but wouldn't surprised if gives error because 1 or more rows have date formatted differently. not have happened had defined column of type date right beginning. you should really, consider changing column real date column. btw: date horrible name such column. reserved word , doesn't tell stored in column (a "start date", "end date", "birth date", "due date", ...)

c++ - why is boost lockfree freelist size is limited to a maximum of 65535 objects? -

why boost lockfree size fixed 65535 objects? typedef boost::lockfree::queue<int, boost::lockfree::fixed_size<true>> myqueue; myqueue queue(1024*100); the above code throws exception. the reasoning find in code array-based freelists support 16bit address space. what reason this? using on 64bit linux machine. why limit addressing 2**16 items? queue use 'short int' indexing? atomic instructions work 16bit word size? what should have fixed sized queue more capacity this? boost implementation of lockfree list has fight aba problem . common workaround add tag bits quantity being considered. furthermore, boost has run on 32-bit architecture, means 32-bit values can manipulated atomically. and if split 32-bit value can store 16-bit pointers , 16-bit tag. unsigned 16-bit values limited 65535 different values.

c# - How to abort or terminate a task of TPL when cancellation token is unreachable? -

let's consider method: task foo(ienumerable items, cancellationtoken token) { return task.run(() => { foreach (var in items) token.throwifcancellationrequested(); }, token); } then have consumer: var cts = new cancellationtokensource(); var task = foo(items, cts.token); task.wait(); and example of items: ienumerable items { { yield return 0; task.delay(timeout.infinitetimespan).wait(); yield return 1; } } what task.wait? i cannot put cancel token collection of items . how kill not responding task or around this? i found 1 solution allows put cancellation token items originating thid parties: public static ienumerable<t> tocancellable<t>(this ienumerable<t> @this, cancellationtoken token) { var enumerator = @this.getenumerator(); (; ; ) { var task = task.run(() => enumerator.movenext(), token); task.wait(token); if (!task.res...

time - Description: Connection Timed Out Error -

where problem ? cms or web server ? click here the web-server working. there great tool checking this. downforeveryoneorisitjustme, google it.

How to cover this line of code contain java Annotation in unit testing using Jmock? -

this code retrive data database , match column name data retrieve annotate field name . how cover lines of code in unit testing using jmock ? please me out of problem. arraylist<string> criticalfields = getallcriticalfield("ord", order .getsrcsysid()); if (criticalfields != null && criticalfields.size() >= 1) { string query = "select * tvs.ord src_sys_id='" + order.getsrcsysid() + "' , ord_id='" + order.getordid() + "'"; connection = vwsutil.getconnection(); statement = connection.createstatement(); field[] fields = order.class.getdeclaredfields(); (field field : fields) { field.setaccessible(true); if (field.isannotationpresent(tablecolumnannotation.class)) { tablecolumnannotation column = field ...

Serialize PHP => Unserialize JAVA / Serialize for php in string format -

i have array in php of format: <?php $value = array("id" => 42, "user" => "superman"); echo serialize($value); ?> serialized : a:2:{s:2:"id";i:42;s:4:"user";s:8:"superman";} i receive string in java. how can deserialize in java ? know implements serializable in java not work in case. i want create object in kind of format : import java.io.serializable; public class serial implements serializable{ private int mid; private string muser; public serial(int mid, string muser) { super(); this.mid = mid; this.muser = muser; } public int getid() { return mid; } public void setid(int id) { this.mid = id; } public string getuser() { return muser; } public void setuser(string user) { this.muser = user; } } after want create time string serialized java object deserialize in php; thanks help. ...

redirecting output at cursor position in java -

how can text sent cursor position clicking button in java? working on project "on screen keyboard" developing using java. want redirect text click on button cursor position normal keyboard key press event do. hello can try use robot class robot doc . used example automated test of ui. example small robot class: import java.awt.awtexception; import java.awt.robot; import java.awt.event.keyevent; public class smallrobot { /** * @param args */ public static void main(string[] args) { robot rob = null; try { rob = new robot(); } catch (awtexception e) { e.printstacktrace(); } rob.delay(10000); rob.keypress(keyevent.vk_h); rob.keypress(keyevent.vk_e); rob.keypress(keyevent.vk_l); rob.keypress(keyevent.vk_l); rob.keypress(keyevent.vk_o); } } you can run small app, ant click on text field on screen (for example notepad window). ...

java - Library to segment and classify binary or grayscale images -

Image
i interpreting scientific (stem) images component parts , adding semantics. these images born digital, noise-free , either binary (monochrome) or have small number of colours. java libraries/methods partition images whitespace-separated components , identify (classify) resulting segments. typical image is: where want extracted segments include numerals , other characters (some rotated) , asterisks in diagram. [i use other methods extract geometrical components - e.g. bars) . library identify identical segments (e.g. 6 0 characters, 5 decimal points). have used tesseract characters many of segments may not belong unicode character set (e.g. purpose-created symbols). update: have opened bounty. interested in libraries, not suggestions algorithms have written prototype one. if functionality part of larger system (e.g. think jbig2 has functionality) please make clear entry points are. note: "born-digital" means image created without noise, clean lines unlike - - scann...

Zend View : How to use an output multiple times in the same view script? -

i'm working on page show list of articles of catalog, pagination (i don't use zend_paginator) the pagination bloc ok, render multiple times (at top , @ bottom of list) inside view script, there way capture output, , render twice without using external view script (which executed 2 times) ? placeholder solution, capture once, , output can used multiple times : <? $this->placeholder('foo')->capturestart(); ?> script make pagination... <? $this->placeholder('foo')->captureend() ?> <!-- used 1 time --> <?= $this->placeholder('foo'); ?> items display <!-- used second time --> <?= $this->placeholder('foo'); ?>

Convert .java to .class within a java program -

this question has answer here: how can compile , deploy java class @ runtime? 7 answers i have several .java files created during runtime. want use created .java files classes in program. how may this, without starting program second time ? want compile .java files during runtime , use new .class files on... use java compiler api: public class simplecompiletest { public static void main(string[] args) { string filetocompile = "test" + java.io.file.separator +"myclass.java"; javacompiler compiler = toolprovider.getsystemjavacompiler(); int compilationresult = compiler.run(null, null, null, filetocompile); if(compilationresult == 0){ system.out.println("compilation successful"); }else{ system.out.println("compilation failed"); }...

c++ - How to push_back multiple values into a vector? -

Image
i know question has been asked before, , know in c++11 can do vector<int> v = {2,5,8,11,14}; vector<int> v{2,5,8,11,14}; and v.push_back({x,y}); but gives me compile error. i'm using visual studio express 2012. how accomplish this? edit: error screenshot attached: visual studio 2012 does not support vector initialization via initializer lists . there lot of c++11 support missing standard library included vs2012 supported vs2012 c++ compiler itself. sadly, case vs2012 , case gcc 4.7, awesome compiler support new c++11 features hampered partial library support seems lag behind compiler.

jquery - How to call JavaScript function during Pageload? -

i have html page contains several pages data-role = page page1,page2 etc. trying call js method during pageload of page1 using following code $("#page1").on("load",function () { alert("hi") $.ajax({ type: "get", url: "", data: "{}", contenttype: "application/json", datatype:"json", success: function (msg) { var bprlist = ''; $.each(msg, function(i,v){ bprlist += '<li onclick="getbprdetails('+ v.bprno +')"><a href="#bprpage" data-transition="slide"><p class="title">' + v.bprno + '</p><p class="bodyele">' + v.bpr_product +'</p><p class="bodyele">' + v.bpr_details+ '</p><br/...

android - Dynamically adding/removing pages from FragmentStatePagerAdapter -

i looking @ example of fragmentstatepageradapter @ http://developer.android.com/reference/android/support/v4/app/fragmentstatepageradapter.html public static class myadapter extends fragmentstatepageradapter { public myadapter(fragmentmanager fm) { super(fm); } @override public int getcount() { return num_items; } @override public fragment getitem(int position) { return arraylistfragment.newinstance(position); } } i've looked around @ other posts in stackoverflow, still unsure how add/remove pages fragmentstatepageradapter, , how getitem method called. if looking add method myadapter add pages, how done? or not standard way of adding pages? information appreciated. after adding new item you'll need call myadapter.notifydatasetchanged(); also, seems use const number or items num_items , you'll need change dynamic can change.

java - Informix DDL execution for constraint disabling -

i planning disable foreign key constraint avoid recursive relationship while purging data. main steps written below: connection conn = getconnection(si_single_url2, si_uname2, si_pass2); // return valid java,sql.connection statement stmt = conn.createstatement(); boolean isconstraintdisabled = stmt.execute("alter table zee_temp_tab_2 nocheck constraint all"); stmt.executequery("delete zee_temp_tab_2 id = 'a'"); boolean isconstraintenabled = stmt.execute("alter table zee_temp_tab_2 check constraint all"); please advise how it. to disable constraints table (pk, uniques, not null, check) set constraints table <table> disabled; or specific contraint set constraints <constraint_name> disabled; to enable, use "enabled" parameter. observation: pk, fks , uniques recreate internal index... depending of # of records, maybe take time.... careful. other options use "deferred" option (this way do...

html - Create banner with gradient opacity overlay -

i need create following banner: http://schuub.net/banner.png my question is, how can create gardient white transparent overlays image partially on left. my html can found here: http://schuub.net/banner.html <!doctype html> <html lang="en"> <head> <style> body { margin: 0 auto; width: 1024px; } .my-banner { background-repeat: no-repeat; background-position: right -175px; background-image: url("http://sphotos-c.ak.fbcdn.net/hphotos-ak-ash3/s720x720/3755_4323318453951_692396489_n.jpg"); height: 200px; width: 100%; position: relative; border:solid 1px; } .banner-data { position: absolute; left: 0; top: 0; width: 70%; height: 100%; background: -ms-linear-gradient(left, rgba(255,255,255,1) 0%,rgba(255,255,255,0) 1...

c - how do remove enclosing brackets from string? -

i have char s9[7] = "[abcd]"; how remove brackets [] that s9 == "abcd" i have tried s9 = s9.substring(1, s9.length-2); throws error in cygwin a2v2.c:42:13: error: request member ‘substring’ in not structure or union a2v2.c:42:29: error: request member ‘length’ in not structure or union edit: i realised error, beginner @ c , couldnt differentiate between c , c++ code, regards someone correct me if i'm wrong, since c standard know couple of decades old, far know, c doesn't offer standard support string manipulation, , in fact doesn't officially have concept of strings. (or of object functions, matter.) instead, c uses pointers, more powerful, more dangerous in can mess things if don't learn way around them. the important thing, if want c programmer learn c. @ least, need "string manipulation c" , read of pages pop up. there many ways want. think 1 of faster ones (though modifies string you're lookin...

extend wordpress core class in functions.php -

i trying extend wordpress core class inside theme's functions.php, & class trying extend wp_customize_image_control class wp-customize-control.php in wp-includes. it extends "wp_customize_upload_control". i allow .svg mime-type uploaded within theme customizer. in theme's functions.php adding these lines: class wp_customize_image_control_svg extends wp_customize_image_control { public $extensions = array( 'jpg', 'jpeg', 'gif', 'png', 'svg' ); }; but sadly breaks everything. any help, hints or tips appreciated. you close. /* extend image control */ class wp_customize_image_control_svg extends wp_customize_image_control { public function __construct( $manager, $id, $args = array() ) { parent::__construct( $manager, $id, $args ); $this->remove_tab('uploaded'); $this->extensions = array( 'jpg', 'jpeg',...

Entity Framework 5 on framework 4, contains and multiple outer joins with same table -

i having strange issue on application when deploying on windows 2008 r2 server. given simple linq snippet: return invoice in me.invoices loggedcustomerid.contains(invoice.contract.customerid) order invoice.date descending the application works, in some cases (on customer server), generated t-sql strange: select [extent1].[contractid] [contractid], ... [dbo].[invoice] [extent1] inner join [dbo].[contract] [extent2] on [extent1].[contractid] = [extent2].[contractid] left outer join [dbo].[contract] [extent3] on [extent1].[contractid] = [extent3].[contractid] [extent2].[customerid] = 482283 or [extent3].[customerid] in (498565,482282,498564,498566) table linked multiple times (?) the in statement broken multiple t-sql conditions instead of single in statement obviously same package runs fine on system generating correct query without linking same table multiple times , creating single in statem...

ios - Scrolling is not proper When i used SDWebImage -

i have serious problem of scrolling table. initially used gcd loading image in background , setting on table cell. table not scrolling smoothly. used sdwebimage same thing happening. could let me know reason this. why table scrolling not smooth expected. please let me know views app waiting release same purpose. code : -(uitableviewcell*)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ nsstring *cellidentifier = @"cell"; customcellforexhibitor *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { nsarray *xibpath = [[nsbundle mainbundle]loadnibnamed:@"customcellforexhibitor" owner:self options:nil]; (id fileobject in xibpath) { cell = (customcellforexhibitor*)fileobject; } } objdatamodel = [parserdatacontentarray objectatindex:indexpath.section]; cell.exhibito...

java - Move from bottom animation JDialog -

i have write animation jdialog, if in listener of jbutton works in constructor no . have try thread , timer , it's not working too. my code : testthedialog.java import java.awt.event.actionlistener; import javax.swing.jframe; import javax.swing.jbutton; import java.awt.event.windowadapter; import java.awt.event.windowevent; import java.awt.event.actionevent; public class testthedialog implements actionlistener { jframe mainframe = null; jbutton mybutton = null; public testthedialog() { mainframe = new jframe("testthedialog tester"); mainframe.addwindowlistener(new windowadapter() { public void windowclosing(windowevent e) {system.exit(0);} }); mybutton = new jbutton("test dialog!"); mybutton.addactionlistener(this); mainframe.setlocationrelativeto(null); mainframe.getcontentpane().add(mybutton); mainframe.pack(); mainframe.setvisible(true); } ...