Posts

Showing posts from April, 2013

objective c - iphone - Calendar.app-like UITableView paging -

i'm developing app displays list of events in tableview. users should able switch between different weeks, meaning table view should reload data. want make switching nice :-) i how implemented calendar.app in day-overview mode: can swipe , switch between different days. how can make similar? thanks in advance! try one...its quite easy use , flexible edit per usage. klazuka / kal

Neo4j - How to get current version via REST -

how can current running neo4j-server version (or in general server informations) via rest? there "/status" uri or similar? making request against server data root return info: get http://localhost:7474/db/data/ the call return json object. server version in key "neo4j_version". documented here .

c# - Show unnecessary usings in Visual studio 2010 -

Image
i programing in c# using visual studio 2010. possible make show me usings not used in code? this must you... right click mouse on vs

Android custom widget based on existing widgets -

i hope problem understandable because i'm android beginner , english not native. i create custom widget group couple of textview, progressbar , button. goal able declare custom widget in xml layout file custom attributes define buttons texts, etc ... disposition of inner android widgets same , defined in class. i have found how declare custom attributes , create custom widget, didn't found documentation nor examples in simple case of placement of existing android widgets. i'am surprising maybe search in wrong direction. below simple code testing. custom class : public class castleviewitem extends view { private textview item; public castleviewitem (context c, attributeset attributes) { super(c, attributes); item = new textview(c); typedarray attrs = c.obtainstyledattributes(attributes, r.styleable.castleviewitem); item.settext(attrs.getstring(r.styleable.castleviewitem_name).tostring()); } @override protected ...

regex - How to search for all uppercase words in vim? -

i search uppercase words in file have no idea how (or if it's possible). found solution here on stackoverflow, doesn't work on vim. from command mode, assuming not have option ignorecase set: /\<[a-z]\+\> or /\v<[a-z]+> finds string of capital letters greater length 1 surrounded word boundaries. second form uses 'very-magic'. :help magic details

android - Creating bitmap from canvas java -

solution thanks @chandrasekhar's suggestions issue was passing in immutable bitmap canvas constructor. solution create copy of when using bitmapfactory.decodefile(); bitmap bmp = bitmapfactory.decodefile(imageurl).copy(bitmap.config.argb_8888, true); so have bitmap using bitmapfactory.decodefile() , works. able create bitmap, need create canvas , things weird. here's flow of happening. capture image, pass functiona sizes it, , saves out , returns file path. ( using phonegap cordova ) i pass url java , use saved image , manipulate in functionb code in question: // url image final jsonobject options = optionsarr.optjsonobject(0); string imageurl = options.optstring("image"); // create image bitmap bitmap bmp = bitmapfactory.decodefile(imageurl); bmp = bitmap.createbitmap(bmp,0,0,655,655); /* works fine until point */ // create image canvas canvas canvas = new canvas(bmp); bitmap 1 = bitmap.createbitmap(bmp); canvas.drawbitmap(one,0,0,null); i rece...

sql - Merging two csv files -

im new databases , programming. im trying find easy way combine data 2 csv files. there tools doing this? i'm trying combine these 2 tables 1 big table can run scripts on it. assuming 2 .csv files in same format , comma-separated-values text files, can combine 2 files using cat on linux , appropriate tool on windows. then, can load resultant, combined .csv file database's table. you 2 separate loads, 1 each of .csv files, using database managers load tool. assumes database table employs unique key , and 2 .csv files not contain duplicate data.

how to setup CVS pserver in linux -

i new cvs. installed cvs repository. have imported project cvs. need access cvs repositroy locally not able access getting below error on remote m/c export cvsroot=:pserver:cvs@:/etc/cvs/source cvs login logging in :pserver:cvs:2401/etc/cvs/source cvs password: cvs [login aborted]: connect [host_name]:2401 failed: connection refused checked on cvs server port 2401 not running. pointer how start/open port 2401. here instructions adding pserver: http://comsci.liu.edu/~murali/cvs/pserver.htm

xcode - How to release and retain memory properly for view controllers using ARC ? - iOS -

using arc feature record_audio_testviewcontroller *view2 = [[record_audio_testviewcontroller alloc] initwithnibname:@"record_audio_testviewcontroller" bundle:nil]; [self.view addsubview:view2.view]; using above code page navigate view2 page there not able access button.. in view2 pressed button got error exe_bad_access (code=1 address=012902) how release memory properly???? but using [self.navigationcontroller pushviewcontroller:view2 animated:yes]; this popviewcontroller , pushviewcontroller not working ..(not able navigate view2 page) anyone know reason???? the problem you're creating view controller, you're not using it, rather using view (but letting arc release view controller, itself, when goes out of scope). when transitioning between view controllers, should use pushviewcontroller (if you're using navigation controller) or presentmodalviewcontroller (if want present next view modally; in ios 5 use presentviewcontroller...

html5 - CSS - Frames with bobbly borders -

Image
i wobbly frames images , text in website (if move, optimal), im not sure how it. i've been looking paperjs.org i'm not sure if can use wrap html text irregular forms. do guys know library or technique use effect? or maybe impossible in current status of web? a simple less optimal solution post html content z-index of 1 , place png of background on top of content z-index of 2. that allow simulate picture have posted wouldn't able add animation of content shape. though have background pan left or right(simulating effect of looking through window, walk left or right). if wanted create same effect possibility of animating shapes want use html5 canvas , how done beyond me.

linux - GCC how to force redefinition warning to error -

in gcc can pass option -werror= to force particular warning error. not able find option need pass warning redefined [enabled default] to error. option should pass if user defined macro redefined force error. since g++ -fdiagnostics-show-option -wunused-macros ./test.cpp doesn't come flag that directly controls emission of warning (diagnostic) can conclude there is, in fact, no such option. you might inquire @ gcc-devel list or file request enhancement. alternatively, @ preprocessor has more options , use explicitely.

mercurial - Creating remote bookmarks while pushing to hgweb server -

there's lot of questions bookmarks none of them answers question: what should allow creating bookmarks while pushing hgweb server? here's i'm getting while trying push bookmark: $ hg push -b feature1 pushing http://local_server/hg/project searching changes no changes found exporting bookmark feature1 updating bookmark feature1 failed! is there should put .hgrc or in hgweb config? when bookmarks exist in remote repo updated, creating bookmarks push works on bitbucket i'm sure it's possible. problem solved: in system there 2 mercurial versions installed: /usr/bin/hg == v1.4 /usr/local/bin/hg == v2.2 although wchich hg prints /usr/local/bin/hg nginx using /usr/bin/hg . thank help. problem solved: in system there 2 mercurial versions installed: /usr/bin/hg == v1.4 /usr/local/bin/hg == v2.2 although which hg shows /usr/local/bin/hg nginx using /usr/bin/hg .

android - Restarting CursorLoader does not reflect database deletion -

i using cursorloader keep track of data in database. database can deleted context.deletedatabase(databasename); after deletion restart loader with getloadermanager().restartloader(loader_id, null, this); now when callback onloadfinished(loader<cursor> loader, cursor data) it doesn't reflect data gone. same data before. am doing conceptually wrong? the loadermanager trying smart , re-use loader. work-around different loader bug, think work this: loader<object> loader = getloadermanager().getloader(0); if (loader != null && ! loader.isreset()) { getloadermanager().restartloader(0, null, mitemslistener); } else { getloadermanager().initloader(0, null, mitemslistener); }

Beginner here: Regarding Ruby on Rails - HOW does it work? -

ok, have far learnt develop wordpress websites, , have been developing themes around 2 years. would, hoever, move "actual" web development, rather wordpress. have stumbled upon rails, , have been doing research, still don't know take create website rails. do need template files same way need them in wordpress? if so, minimum files need put website? (e.g. index/home.php, sidebar, header, footer?) need deep understanding of sql? can use rails hosting services? firs thing need understand before begin practical learning on ror (i learn go along - instance, people starting out learning html learn building website go along). again, apologies asking such horribly noobish question sensitive stuff. ask bear me, knowledge @ 1 point complete beginners @ anything. cheers. rails new appname :) follow tutorial, example: http://ruby.railstutorial.org/ beyond that, question far broad.

python - Why is the initial value to the reduce function not mandatory? -

in haskell, initial value foldl operator mandatory prelude> foldl (+) 0 [1] 1 prelude> foldl (+) 0 [] 0 prelude> :t foldl (a -> b -> a) -> -> [b] -> but in reduce function (or functools.reduce ), initial value optional reduce(function, sequence[, initial]) -> value the time initial value required when sequence empty. congruent behaviour in haskell. reduce in python assumes if sequence of size 1; handles these corner cases internally ? >> reduce(operator.sub, [1]) 1 >> reduce(operator.mul, [1]) 1 >> reduce(operator.add, [1]) 1 from manual : if initializer not given , iterable contains 1 item, first item returned i want comment on this: the time initial value required when sequence empty this not entirely true. in fold operation assume have earlier result work with. if fold operation appending elements list initial element can empty list, can add elements that. more generally, initial value need...

opengraph - Can't publish Open Graph actions - error 2500 -

can please me problem facing last days. i trying use open graph on our videos. this link example page. it's working on facebook graph api , on test page sits on our server not part of site. when try on our system, getting error: {"message":"an active access token must used query information current user.","type":"oauthexception","code":2500} when check page on debugger tool, error: object invalid value: object @ url 'http://www.101greatgoals.com/gvideos/stunning-setplay-juan-roman-riquelme-boca-juniors-vs-deportivo-merlo/' of type 'video.other' invalid because given value '' property 'og:image:url' not parsed type 'url'. there "test" button below videos in order run action. didn't find solution fixing yet. can please advice? thanks. object invalid value: object @ url 'http://www.101greatgoals.com/gvideos/stunning-setplay-juan-roman-...

Running Chrome as Windows Shell breaks some CSS properties -

we have set google chrome run windows shell setting in registry: hkcu\software\microsoft\windows nt\currentversion\winlogon shell = [chrome path] when run way, css properties break page. renders blank white page: <!doctype html> <html> <head> <style type="text/css"> * { -webkit-perspective: 1000; -webkit-backface-visibility: hidden; } </style> </head> <body> hello, world </body> </html> if start explorer.exe , refresh page, works. once page in working state, can kill explorer.exe , keep working. have tried executing runonce.exe /alternateshellstartup. chrome version 19.0.1084.52 on windows 7 professional 64 bit try using following command-line switch chrome --disable-accelerated-compositing i had same problem (not css properties in quest, code including webkit-transform, webkit-animation, etc.). issue resolved disabling accelerated compositing. lets play mp4 video when running windows ...

knockout.js - Knockout mapping wcf -

i have problem map json object returned wcf. wcf return list of paidpeople class, , json return [object { __type="paidpeople:#model", amount=110, attendee=1, more...}, more...] i json.stringify return object , array of [ {"__type":"paidpeople:#model","amount":110,"attendee":1,"cashpay":1,"dtpaid":"/date(1338102000000-0700)/","name":"john doe"}, more ] my problem mapping view here code var payinyvm = {}; $.getjson('/service/paidservice.svc/paidlist', function (data) { var tmp = json.stringify(data.d); payinyvm.model = ko.mapping.fromjson(tmp); ko.applybindings(payinyvm); }); //getjson and html looking like: <div data-bind="foreach: ????"> <h3 data-bind="text: name"> </h3> <p> name: <span data-bind="text: name"></span> ...

linux - htaccess redirect to subdomain and keep string -

found few similar questions either cant figure out answers or dont directly match needs. what trying achieve this: i moved part of site sub domain on different server used in: http://mysite.com/clients on http://clients.mysite.com using: redirectmatch 301 https?://mysite.com/clients/^(.*)$ https://clients.mysite.com/$1 works fine redirecting people hitting http://mysite.com/clients new sub domain able preserve string after /clients/ so if hits e.g. http://mysite.com/clients/could_be_a_number_of_things.php redirects http://clients.mysite.com/could_be_a_number_of_things.php can advise? full .htaccess requested: # -frontpage- indexignore .htaccess */.??* *~ *# */header* */readme* */_vti* <limit post> order deny,allow deny allow </limit> <limit put delete> order deny,allow deny </limit> #authname mysite.com #authuserfile /home/inhost/public_html/_vti_pvt/service.pwd #authgroupfile /home/inhost/public_html/_vti_pvt/service.grp # begin wor...

Sending data from OpenCV matrix to Matlab Engine, C++ -

i sending data opencv matrices matlab using c++ , matlab engine. tried convert column major row major confused on how that. cannot understand how deal matlab pointer mxarray , put data engine. has worked opencv matlab send matrices? didn't find information , think interesting tool. welcomed. i have function works if have created matlab engine. creating singletone template matlab engine: my header looks this: /** singletone class definition * */ class matlabwrapper { private: static matlabwrapper *_theinstance; ///< private instance of class matlabwrapper(){} ///< private constructor static engine *eng; public: static matlabwrapper *getinstance() ///< instance public method { if(!_theinstance) _theinstance = new matlabwrapper(); ///< if instance=null, create return _theinstance; ///< if instance exists, return instance } public: static vo...

php - Import existing Symfony project in PHPEdit -

i've downloaded evaluation copy of phpedit because saw supports symfony. i've managed build new project, problem have existing project completed. there possibility import these files in phpedit? no, can't import existing symfony project in phpedit directly. have manually.

javascript - jQuery thumbnail script edit -

i created script takes full size image , makes thumbnail out of it. problem is, if link image breaks script. i've tried has failed. can check out jsfiddle , notice first thumbnail works second 1 not (because it's linked). getting straightened out appreciated. to clarify, thumbnails linked, don't need script work on first thumbnail in example. need work on second (linked) thumbnail. http://jsfiddle.net/ussmy/ at end of code try call fitimages( $('.titled-thumb img') ) since wrote fitimages($('.titled-thumb > img')) > immediate descendant selector if link images, you're placing intermediate element selector cannot work anymore. if remove selector fiddle see images ( your fiddle updated ) update: same reason change parent = img.parent(), with parent = img.closest('div'),

java - function mapping delphi/pascal dll in jna handle and string -

i'm trying call function in delphi dll using jna . function definition is: function myfuncgetname (ahandle : thandle; var abuf : pwidechar ): integer; export; my jna mapping looks this: int myfuncgetname(pointerbyreference ahandle, wstring abuf); the return value should 0 success , -1 fail , i'm getting -1. i have started windbg , attached process , breaks @ myfuncgetname. 057cb384 eb11 jmp mydll!myfuncgetname+0x87 (057cb397) 057cb386 b8dcb37c05 mov eax,offset mydll!myfuncgetname+0xcc (057cb3dc) 057cb38b 8b55f8 mov edx,dword ptr [ebp-8] 057cb38e 8902 mov dword ptr [edx],eax ds:002b:00000000=???????? <-- ### breaks here ### 057cb390 c745f4ffffffff mov dword ptr [ebp-0ch],0ffffffffh i'm not assembly wiz correct me i'm wrong. think moving address (function argument) location ebp-8 edx register. ebp-8 points value 0 edx 0. moves eax address pointed edx. not supposed move 0 breaks? why aren...

ios - Distribute Ipad App without app store -

supposing following scenario: company asks company b produce ipad app them. company wants use on limited amount of ipads (less 100). company not interested in offering on app store. how can company b distribute app (sell it) company a? install app on ipads via ad hoc provisioning profile, meant testing , app can't used once profile expires. how can b legally install app on ipads without app expiring after 1 year? when using app store, there option sell app company, or specific users via app store, when companies not located in u.s. (i heard b2b distribution can used in u.s.) would enterprise distribution option choose? company must have ios developer enterprise program ticket, can install app on ipads, , not company b, right? yet company b developer here... or legal, if company b had ios developer enterprise program ticket, installed app on ipads , sold ipads company a? enterprise distribution want in situation.

Calling an argument in a python function as part of the function definition? -

how can pass argument in function input within function definition? for example: def correlate1(vara1, vara2=vara1*2): print "test" returns: traceback (most recent call last): file "test.py", line 321, in <module> def correlate1(vara1, vara2=vara*2): nameerror: name 'vara1' not defined obviously, this: def correlate1(vara1, vara2=0): if vara2==0: var2=vara1*2 print "test" but there way in function definition? just set once function called: def correlate1(vara1, vara2=none): vara2 = 2 * vara1 if vara2 none else vara2 print "test" or more simple: def correlate2(var1, var2=none): var2 = var2 or var1 * 2 print "test" var2 's default value expression can not contain var1 because var1 not exist until function called.

javascript - How to share data between browser tabs? -

i have develop program need event server , want update web page. e.g. have multiple browser tab opened chat , each chat page have own thread fetch event server once 1 thread among chat fetch event other empty stack of event due extract chat page. so, here concern share event multiple chat pages without refreshing page. sound use postmessage have tab gets message share other pages on domain. postmessage(json.stringify({chatmsg: somevarfromserver}), "http://www.mydomain.com"); have other chat pages listen message events: window.addeventlistener("message", receivemessage, false); function receivemessage(event) { // reject foreign messages! if (event.origin !== "http://www.mydomain.com") return; var message = json.parse(event.data).chatmsg; // other page has message }

asp.net - wget to download dynamic website which uses aspx -

i m trying download entire website using wget offline learning. wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains scmhrd.edu --no-parent http://elearning.scmhrd.edu/frmset.aspx all static content gets downloaded not dynamic contents . there way ? there no way download server side code http. that's why asp.net rules!

c# - ASP.Net MVC4 RC Web-Api Odata filter not working with IQueryable -

in asp.net mvc4 rc's web-api, had action defined before: public iqueryable<person> get() { var lst = ctx.getlistfromdb(); return lst.asqueryable(); } when was running before if called url like: /api/people?$inlinecount=allpages&$format=json&$top=50&$filter=(state+eq+'al'+and+zip+eq+'35242') it filtering on objects, has changed since beta break this? you have put [queryable] attribute on method allow filtering. release notes describing change are here . update: in rtm seem have separated feature own assembly have include reference asp.net web api odata assembly microsoft. can find latest version on nuget https://nuget.org/packages/microsoft.aspnet.webapi.odata update: in latest version queryable attribute have been renamed enablequery. more information changes see http://blogs.msdn.com/b/webdev/archive/2014/03/13/getting-started-with-asp-net-web-api-2-2-for-odata-v4-0.aspx

javascript - accessing DOM elements by jQuery -

say have following dom element in piece of code: <div id="test"> <div id="t2"> hi <b>gopi</b> , 20 years old. <p id="div2"> <button onclick="alert('lol')">check</button> </p> </div> </div> suppose wanted traverse through contents of div#t2. $("#t2").children() gives me <b> , <p> tags. so how should access values array containing " hi am ", " <b>....</b> ", " and 20 years old. ", " <p>.....</p> ?? use native dom node : $('#t2')[0].childnodes gives array want. you'll want trim entries before using them using $.trim since actual text node contains whitespace in html.

multithreading - In C++, is there a way to lock the object itself? -

i have stl map synchronized across several threads. have... function (modifies map) void modify(std::string value) { pthread_mutex_lock(&map_mutex); my_map[value] = value; pthread_mutex_unlock(&map_mutex); } function b (reads map) std::string read(std::string key) { std::string value; pthread_mutex_lock(&map_mutex); std::map<std::string, std::string>::iterator = my_map.find(key); pthread_mutex_unlock(&map_mutex); if(it != my_map.end()) { return it->second; } else { return "dne"; } } this synchronized across threads, due mutex. however, have lock mutex in function b though not modifying map @ all. there way lock my_map object in function a, , not lock in function b while keeping thread synchronization. way, instances/calls of function b continue run freely, long function not being run? thanks you don't want lock container, want lock accesses container...

php - How to show an Alert via ajaxSubmit? -

i'm trying display alert message through ajaxsubmit successful in example code below: submithandler: function( form ){ var dados = $( form ).serialize(); $.ajaxsubmit({ type: "post", url: "...", data: dados, complete: function( data ) { // $("#cargo").resetform(); alert("alert message"); $("#txtnome").focus(); $("#txtnome") .hide() .show("slow"); document.getelementbyid("cargo").reset(); } }); return false; } but every time form data saved, no alert message shown! can me? check code. working. ...

How to minify JavaScript files that contains a function name separated with a '.'? -

i minfying 100's of javascript files on windows os , ran issue half of them. turns out minfiying compressor cannot minify js files has function spearated dot. yui compressor deletes contents of file when such situation happens, , ajaxminifier, ignores dot , take function name before it. example of function in question: function window.onload() {} error message: :missing ( before function parameters using yui compressor msbuild task , command line both yeild same results. command line example: java -jar yuicompressor.jar --type js --charset utf-8 -o d:\foo.js d:\foo-min.js using ajax minifier example: command line: ajaxmin.exe -o d:\foo.js d:\foo-min.js however, 1 solution rewrite function , minification process works great example: window.onload = function() {} but not option us, right now. know problem , able provide solution? thanks. yes, did inherit these files , yet determine why written way. dont believe there processor converts proper js..i ...

UITextField not setting NSString -

i have pickerview in popover. when user selects row pickerview, should stored uitextfield ( subject ) the method i'm having troubles is: - (void) viewwithpickercontroller:(viewwithpickercontroller*) viewwithpickercontroller didselectvalue:(nsstring*) value { nslog(@"selected value is: %@",value); subject.text = [nsstring stringwithformat:@"%@",value]; nslog(@"subject is: %@",subject.text); } where value row of pickerview: logs right value doesn't set textfield subject , seems null. where wrong? you need make sure " subject " iboutlet set. if you're doing picker view method before xib / view controller instantiated, explain why subject nil object. how else instantiating " subject "?

flex4.5 - FLEX AIR project directory structure for storing LOW and HIGH resolution images -

any idea directory structure should 1 follow flex air projects in there need store both low , high resolution images low-res images used when app loaded in mobile , hi-res image used when loading app in tablet. here how it: <fx:declarations> <s:multidpibitmapsource id="back" source160dpi="@embed('assets/icons/low-res/back.png')" source240dpi="@embed('assets/icons/mid-res/back.png')" source320dpi="@embed('assets/icons/high-res/back.png')"/> </fx:declarations> <s:states> <s:state name="portrait"/> <s:state name="landscape"/> </s:states> <s:navigationcontent> <s:button icon="{back}" label.landscape="back" click="navigator.popview()"/> </s:navigationcontent> see doc support multiple screen sizes , dpi values in mobile application

MySQL IF NOT EXISTS / IFNULL SELECT other column -

i want check, if column (mysql) exists. if not, mysql should take value column exists. query looks this, not work: if not exists (select `en` `hp_strings` `name`='copyright' , `group`='system') select `default` `hp_strings` `name`='copyright' , `group`='system'; i tried ifnull((select `en` `hp_strings` `name`='copyright' , `group`='system'), (select `default` `hp_strings` `name`='copyright' , `group`='system')); same result (error) edit: 'en' not exist. want know, if exists. to inspect table structure in mysql, have query information_schema database. that, db user must have access system database (which regular user shouldn't have). i don't know trying do, should rethink database structure doesn't require checking if column exists in table.

tsql - use of variable causes update to run very slow -

i have following query. update t set unitssold = sub.unitssold, dbo.table1 t join (select s.customerkey, s.weekkey, s.productkey, sum(s.unitssold) [unitssold], dbo.table2 s weekkey >= 335 group s.weekkey, s.customerkey, s.productkey) sub on sub.weekkey = t.weekkey , sub.customerkey = t.customerkey , sub.productkey = t.productkey it runs champ. 2 seconds. when try , make dynamic via following. declare @startweekkey int set @startweekkey = 335 update t set unitssold = sub.unitssold, dbo.table1 t join (select s.customerkey, s.weekkey, s.productkey, sum(s.unitssold) [unitssold], dbo.table2 s weekkey >=...

vb6 - VB- save offline txt file to server when connected to network -

i have written excel vb save file sharepoint automated task. works fine if connected office network. if offline , save file local drive . can me macro save file server when computer connected office network? office not recommend checking network status continuously. suggestions appreciated by automated task mean scheduled task? if , happen running on windows 7, can set scheduled tasks run if network conditions met. build separate macro takes files stored locally , pushes them server , have macro run when network connected.

timezone - IBM vs Oracle/Sun JDK, java.util.Timzone getOffset () behaving differently -

ibm vs oracle/sun jdk, java.util.timzone behaving differently , ibm jdk 1.5 vs sun/oracle jdk 1.6 import java.util.*; class timetest { public static void main(string args[]){ long = system.currenttimemillis(); system.out.println("est : " + timezone.gettimezone("est").getoffset(now)); system.out.println("us/eastern : " + timezone.gettimezone("us/eastern").getoffset(now)); } } ***ibm jvm ouput est : -14400000 us/eastern : -14400000 oracle jvm est : -18000000 us/eastern : -14400000 ibm jdk java -version java version "1.5.0" java(tm) 2 runtime environment, standard edition (build pxi32devifx-20090811 (sr10 +iz56666+iz56751)) ibm j9 vm (build 2.3, j2re 1.5.0 ibm j9 2.3 linux x86-32 j9vmxi3223-20090707 (jit enabled) j9vm - 20090706_38445_lhdsmr jit - 20090623_1334_r8 gc - 200906_09) jcl - 20090811 oracle jdk java -version java version "1.6.0_24" java(tm) se runtime...

image - Wordpress header imgage won't display in IE -

image in header displays in safari, ffx , opera, not in ie (on 9, btw). not sure if matters, when using ie's developer tools, shows "empty text node" on place. i don't know other code attach post...let me know. site url: http://glassinfusion.accountsupport.com/ header code: <!doctype html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo('charset'); ?>" /> <?php if (is_search()) { ?> <meta name="robots" content="noindex, nofollow" /> <?php } ?> <title> <?php if (function_exists('is_tag') && is_tag()) { single_tag_title("tag archive &quot;"); echo '&quot; - '; } elseif (is_archive()) { wp_title(''); echo ' archive - '; } elseif (is_search()) { ...

php - Getting Labels of id's -

Image
what best way labels of id's . here problem i'm facing . i have many tables contains id's (subject_id , level_id , place_id , etc..) what best way display labels of id's without making complex sql query when displaying (have minimum of 6'ids) ? the other options not nice call get_label(id,table,lang) but of course can see problem each column (total queries = column * rows) any better solution or i'm stuck without doing join on 6 tables ? if it's helps i'm using kohana here have ... and subject table subject_id : i have every field_id table correspond . in term of performance better making join or calling query specific label when needed . ? you want use sql join this. select t1.*, t2.subject_en, ... table1 t1 join table2 t2 on (t2.id = t1.subject_id) a join has better performane - have single query can optimized database engine while doing select while iterating on rows initial query give n+1 separate queries....

c# - Weird Exception with JSON.Net in MonoTouch -

i'm getting similar error post here . i'm parsing json json.net on background thread him. sporadically fails error in array.copy . here stacktrace: system.nullreferenceexception: object reference not set instance of object @ system.array.copy (system.array sourcearray, int32 sourceindex, system.array destinationarray, int32 destinationindex, int32 length) [0x00104] in /developer/monotouch/source/mono/mcs/class/corlib/system/array.cs:979 @ system.collections.arraylist.copyto (int32 index, system.array array, int32 arrayindex, int32 count) [0x0002d] in /developer/monotouch/source/mono/mcs/class/corlib/system.collections/arraylist.cs:3064 @ system.collections.arraylist.copyto (system.array array, int32 arrayindex) [0x00000] in /developer/monotouch/source/mono/mcs/class/corlib/system.collections/arraylist.cs:3046 @ system.monocustomattrs.getcustomattributes (icustomattributeprovider obj, system.type attributetype, boolean inherit) [0x0026c] in /developer/monot...

java - GSON/Jackson - how to parse array of arrays of variable types -

i have json looks like: {"response":[[215,{typea},{typea},...,{typea}],[{typeb},{typeb},...,{typeb}]]}; 215 integer number, changes in each response, it's not important. typea, typeb classes of application. how can parse json typea/b[] or list? ok, found solution jackson here http://programmerbruce.blogspot.com/2011/05/deserialize-json-with-jackson-into.html

javascript - Clicking OK in a prompt -

i know how create alerts , confirm boxes, cannot find out how do actual clicking of ok. have page pops confirm box. i want click ok using java script add-on. basically, want code click link on page, click ok when prompted. possible? that's not possible browser pop-up. however if it's modal dialog sits within dom of page, can trigger javascript event close it. example of such dialog jquery's dialog .

devise - Rails Date Params -

i learning rails , have come across road block. guidance appreciated. i using device , have :confirmed_at datetime column protected attribute. update admin interface super controller update method , add: @user.update_attribute(:confirmed_at, params[:user][:confirmed_at]) @user.update_attribute(:school_id, params[:user][:school_id]) :school_id gets update correctly :confirmed_at , datetime, nil. looked @ params hash , sure enough not have :confirmed_at has "confirmed_at(1i)"=>"2012", "confirmed_at(2i)"=>"6", "confirmed_at(3i)"=>"2", "confirmed_at(4i)"=>"04", "confirmed_at(5i)"=>"11" rails doesn't seem translating parameters fields datetime objects database. ** how capture these value update :confirmed_at field properly? any appreciated. rails 3.1, ruby 1.9 i guess you're using datetime_...

excel - if cell contains specific text, copy whole row + next row -

i new vbs , need help. i have sheet1 , sheet2. raw data in sheet1 column , sheet2 summary report. want script search each cell in column , search "grade a". if find, copy entired row contains grade word , copy next row , paste in sheet2. here example. sheet1: a b c gradea sdfasdf sadfsadf address sadfas sdfsadfs grade b sadfsd dgfdsgdf address sdfasf ertertewt grade c fhgfdgh ukjtyuyt gradea hhh lll address ppp hhh sheet2 shoud after running script. a b c gradea sdfasdf sadfsadf address sadfas sdfsadfs gradea hhh lll address ppp hhh thank in advance. try following code sub test() each cell in sheets(1).range("a:a") if cell.value = "gradea" matchrow = cell.row rows(matchrow & ...

php - Controller/JToolBar not working in Joomla 2.5 -

relevant code: jtoolbarhelper::custom('savecategories', 'save', '', 'save', false, false); ... <input type="hidden" name="controller" value="easyblogcontroller"> according can dig docs , own previous questions, should call savecategories() function in easyblogcontroller . i've tried setting value easyblog , easyblog.php (file name) current easyblogcontroller (class name). clicking on save button refreshes page. not redirect, echo or var_dump test code put in savecategories() function. var_dump ing jrequest::getvar('controller') , 'task' return correct values. creating controller object , using $controller->execute('task'); works. the values going depend on location of controller trying call, , have couple options here. typically there controller in base folder of component (likely components/com_easyblog) in file called controller.php , class name inside ...

c# - How do I remove a child element based on attributes on multiple parents? -

i have xml file similar structure below: <?xml version="1.0" encoding="utf-8"?> <root attr1="foo" name="myname" attr2="bar" > <parent1 name="is"> <child1 name="kronos1"> <grandchild1 name="word_1"/> <grandchild2 name="word_2"/> <grandchild3 name="word_3"/> <grandchild4 name="word_4"/> </child1> <child2 name="kronos2"> <grandchild1 name="word_1"/> <grandchild2 name="word_2"/> <grandchild3 name="word_3"/> <grandchild4 name="word_4"/> </child2> </parent1> </root> the elements not defined in can have different values other files. know "name" attribute of each element before hand, ...

android - TextView and RelativeLayout onMeasure called a lot -

i'm using traceview in attempts optimize code. noticed textview.onmeasure() , relativelayout.onmeasure() gets called lot, , i'm trying see if there way can optimize this. in listadapter, i'm using viewholders, checking if currentview null suggested various google talks/romain guy. here screenshot of costly functions in traceview. below code layout in list, prove it's not crazy complicated. <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="178dp" android:background="@color/transparent" android:clickable="true" > <relativelayout android:id="@+id/holder" android:layout_width="147dp" android:layout_height="178dp" android:layout_centerinparent="true" android:background="@color/transparent" > <imagev...

How do I upload a file using http post? Delphi 2009 -

my goal upload text file via http post using delphi 2009. say example following url https://www.example.com/ex/exampleapi.asmx/process i understand can done using tidhttp component. , following call idhttp1.post(); but cant figure out how set i.e. specifying url , including file posted. thanks. tidhttp has 2 overloaded versions of post() take filename input: var response: string; response := idhttp1.post('https://www.example.com/ex/exampleapi.asmx/process', 'c:\filename.txt'); . var response: tstream; response := tmemorystream.create; idhttp1.post('https://www.example.com/ex/exampleapi.asmx/process', 'c:\filename.txt', response); ... response.free; note posting https url, need first assign ssl-enabled iohandler, such tidssliohandlersocketopenssl , tidhttp.iohandler property beforehand.

javascript - How to clear if there is no result -

i have map. whenever click state pulls distributors , shows up. however, if there no result database leaves previous 1 on page. want if there no result particular state make container empty. how can it? $(document).ready(function() { $("#sc").click(function() { if ($("div.sc_info").is(":hidden")) { $("#repinfo_container div.info_cont").removeclass("active"); $("#repinfo_container div.info_cont").addclass("inactive"); $("div.sc_info").slidedown("fast"); $("div.sc_info").removeclass("inactive"); $("div.sc_info").addclass("active"); $("div.inactive").slideup("fast"); } else {} }); });​ some more details picture. http://i.imgur.com/vozkp.png interactive distribution map. problem example in database have results(distributors) ca(californi...

html - Elements with "nowrap" in table row prevents entire row from wrapping in IE8 -

Image
i forced development compatible ie8. starting code, see window shrinks table wraps text in way separates radio button: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html><body> <table style="border-collapse:collapse; border:1px solid black"><tr> <td style="border-collapse:collapse; border:1px solid black"> foo </td> <td style="border-collapse:collapse; border:1px solid black"> <label style="white-space:normal"><input type="radio" /> bar bar bar bar bar bar bar </label> <label style="white-space:normal"><input type="radio" /> bar bar bar bar bar bar bar </label> <label style="white-space:normal"><input type="radio" /> bar bar bar bar bar bar ...

dynamic - Is it possible to have a dynamically populating Array of char* in C++ -

i have situation this. declare array of char*; switch(id) { case 1: add 4 words in array case 2: add 2 words in array default: add 1 word in array } use array here; is possible such thing in c++. tried doing not working me. yes. clean, easy-to-understand, correct, exception-safe code, use vector , string : std::vector<std::string> v; switch (id) { case 1: v.push_back("a"); v.push_back("b"); v.push_back("c"); v.push_back("d"); break; case 2: v.push_back("a"); v.push_back("b"); break; default: v.push_back("a"); } // use strings in v; example, using c++11 lambda expression: std::for_each(begin(v), end(v), [](std::string const& s) { std::cout << s << std::endl; }); // or using loop: (std::vector<std::string>::const_iterator it(v.begin()); != v.end(); ++it) { std::cout << *it << std::endl; } of cour...

ASP.NET SPA as an alternative for Silverlight? -

i massive silverlight user. since started realize sooner or later silverlight gonna die (there not going sl 6 heard), i'm starting sniff around alternative technology. i need fluid responsive ui silverlight, , need technology costs 0 development effort. silverlight great it's missing key features (binding types, shared size group , more), , since it's not going developed anymore considering other things. it's not multi-platform (android , ios support minimum). anyway , looked asp.net spa, , kinda liked idea, in other hand, think html5/javascript decades far silverlight, first of c#/vb.net language, related tools, such entity-framework, wcf-ria scaffolding , validation, sdk/toolkit , more. so question if there kind of way make generator turns silverlight website html5+css3+javascript works on every platform, perhaps converting spa app. have ever heard existing project covers issue? think it's doable or take me years develop it? "is there ge...

php - dynamic table in email -

i have been trying last few hours create dynamic table within email.. , have been unsuccuessful have tried create tables in , out of body varible , echo within have had no success have placed code bellow.. anyhelp great thanks.. im trying create table mysql data within , send clients.. thats run down of have been attemoting complete $link = mysql_connect('localhost', 'root', ''); mysql_select_db('netbookdb'); $sql="select * rep_log s_date = '2012-05-31'"; $result=mysql_query($sql, $link); $date=date('dmy'); require("../phpmailer/class.phpmailer.php"); $mail = new phpmailer();$mail = new phpmailer(); $mail->issmtp(); // set mailer use smtp $mail->host = "smtp"; // specify main , backup server $mail->from = "support@.vic.edu.au"; $mail->fromname = "ict devices"; $mail->addaddress("email@h.vic.edu.au", "matthew"); $mail-...

How to modify the Android OpenGL ES 1.0 tutorial to use XML and a framelayout -

the opengl es 1.0 tutorial listed here (http://developer.android.com/resources/tutorials/opengl/opengl-es10.html) works want make work multiple layers , xml framelayout. have this: -class extends activity -class b extends glsurfaceview -class c implements glsurfaceview.renderer the original example has class b handling touch events , class c rendering object displayed. want extend further adding additional geometry layers. have working camera layout (although crashes when changing orientation). working version (main.java): public class main extends activity { mainsurfaceview mglview; cameraview cameraview; /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); //set full screen requestwindowfeature(window.feature_no_title); getwindow().setflags(windowmanager.layoutparams.flag_fullscreen, windowmanager.layoutparams.flag_fullscreen); mglview = new mainsurfaceview...

php - Increasing the size of watermark text applied to an image -

Image
i have code: <?php $filename = 'tulips.jpg'; $stringsize = 10000; $footersize = 40; $footer = 'blyxo.com/post/1234535'; list ( $width, $height, $image_type ) = getimagesize ( $filename ); $im = imagecreatefromjpeg ( $filename ); imagefilledrectangle ( $im, 0, $height, $width, $height - $footersize, imagecolorallocate($im, 128, 128, 128)); imagestring ( $im, $stringsize, $width - ( imagefontwidth ( $stringsize ) * strlen ( $footer ) ) - 2, $height - $footersize, $footer, imagecolorallocate ( $im, 255, 255, 255 ) ); header ( 'content-type: image/jpeg' ); imagejpeg ( $im ); ?> so; image this: but, want set font bigger, doesn't works; i'm trying set $stringsize = 1000, $stringsize = 10, $stringsize= 9 , (...) nothing. and, if possible, want know how set footer in outset of photo; not abolute position; in...

Static analysis on Java-EE frameworks -

there many static analysis tools capable of detecting security vulnerabilities in j2ee applications. my question is: how tools apply java web frameworks struts or spring? can recommend articles or pages regarding subject? many thanks, best regards

algorithm - Probability of RANDOMIZED-QUICKSORT exceed worst case -

the question clrs (exercise 12.4-5) consider randomized-quicksort operating on sequence of n input numbers. prove constant k > 0, o(1/n^k) of n! input permutations yield o(n lg n) running time. how can build model of worst case, , max bound of it. you may want read this notes quick introduction. then, may read this (especially section 3.1) thorough explanation.

Do Android ad-hoc APK installs get google play market updates? -

whenever support request on free version, respond courtesy link non-drm apk of pro version. these ad-hoc apk installs somehow link google play market application id , know updates, or ad hoc installs frozen in time? paid apps , managed in-app purchases tied user's google account, don't think should work. however, if adb install paid app, market/play application displays 'installed', might update notification. assuming allows update, if published app using lvl, should licensing error, because app not linked user's google account. if not, might work. test when upgrade app sure.

iphone - UITableview clipsToBounds -

i creating ipad view has tableview subview. tableview takes small portion of screen , somewhere near middle of screen , contains menu items. want people scroll tableview , down not how cells disappear against hard edge. when set clipstobounds false, want in hard edge not there anymore top/bottom cell disappears when tableview needs cell recycling. there common technique avoid hard-edge of when cells scroll against tableview's bounds? thinking of adding gradient alpha masks on parent container view seems bit on top. there no hard , fast rule this, can whatever feel best. in case of floating tableview giving nice border using layer. easy code (2~3 lines). round edge make pretty. if want drop shadow, gets little more complicated possible. draw bezier curve path of rectangle (where want shadow appear). assign calayer shadowpath. add table. you can gradient alpha make appear shadow like. but suggest, set clipstobounds yes since looks horrible otherwise, given fact t...

php - How to incorporate user settings in an RSS feed? -

i looking have rss feeds dynamically generated (that can do) based on user preference settings. example if user wanted see in rss pictures tags, rss feed show them. there 2 problems looking do: it cannot simple user-id based system, since users may not allowed access items, not want feeds show them. using user-id based system means can enter in random user numbers until 1 things should not seeing. most rss readers not have ability use cookies, login data stored there not work. the system generating php & mysql based. what suggestions have secure system can this? if open internet there no way secure rss. sad. what can have minimal (not critical) data available on rss, , standard sign in cookie stuff when click on rss link details.

jquery - Trying to condense javascript into for loop -

i've got following code trying condense for loop having no luck: $("#motion1-sub1-1").hover( function () { $("#motion1-sub1-1 div").show(); }, function () { $("#motion1-sub1-1 div").hide(); } ); $("#motion1-sub1-2").hover( function () { $("#motion1-sub1-2 div").show(); }, function () { $("#motion1-sub1-2 div").hide(); } ); $("#motion1-sub1-3").hover( function () { $("#motion1-sub1-3 div").show(); }, function () { $("#motion1-sub1-3 div").hide(); } ); $("#motion1-sub1-4").hover( function () { $("#motion1-sub1-4 div").show(); }, function () { $("#motion1-sub1-4 div").hide(); } ); $("#motion1-sub1-5").hover( function () { $("#motion1-sub1-5 div").show(); }, function () { $("#motion1-sub1-5 div").hide(); } ); here's for loop code have condense above code: for (var = 1; <= 5; i++) { $(...