Posts

Showing posts from July, 2011

charts - Flex 3 prevent duplicate stacking in ColumnChart control -

here problem: i'm using columnchart display 6 label/value pairs. when 2 labels same, chart stacks them up, 1 on top of other. want display these duplicates side side, value might same or might distinct. my first thought append unique id label, that's not possible according client. so, there way tell chart take hidden id consideration? someone suggested sort of grouping, need display each chart separate, if distinct charts. the chart's data provider array of these objects: obj.description = "des"; obj.countv = 3;//some arbitrary number obj.id = 2; //a unique id... the chart code:

Finding C++ multimedia editing graph-like frameworks? -

i'm searching multimedia editing graph-like frameworks can create graph elements c++ , can build graphs app needs elements of framework. so far know there gstreamer directshow quicktime qt phonon (cross-platform wrapper around first 3) i wonder see else out there - there proprietary or open source, cross-platform or platform-dependent alternatives , main goals? microsoft media foundation -- more or less replacement directshow. don't see drastic improvements, if want use (for example) microsoft's new h.264 decoder, you're pretty stuck it. can undoubtedly guess name, it's windows only. perhaps less obviously, it's supported on vista , later. another sort of fits description ffmpeg .

c - How can I disable the Start button (but not the Taskbar) on Windows 7? -

Image
on windows xp, possible disable start button following code: htray = findwindow (text("shell_traywnd"), null); if (htray) { hstartbutton = findwindowex(htray, null, text("button"), null); if (hstartbutton) showwindow(hstartbutton, false); } for public-access computer configuration, need able on windows 7. start button must disabled (not hidden), , remainder of taskbar must still visible , usable. hiding taskbar along start button not option. running full-screen not option. using "start killer" won't work because doesn't disable start button, hides (users can still use hotkeys pull start menu). i have tried method uses findwindowex 0xc017 third parameter , tries disable window. doesn't work. method works if whole taskbar disabled first. need method only disables start menu, code reproduced above in xp. any appreciated. the "correct" version windows 7 shown below: hwnd hstartbtn = findwindowex(null, null

iphone - Under iOS, does anyone know how UUID's are generated for executables and what information may be encoded therein? -

applications compiled on ios assigned identifiers (uuid's) @ compile time. these identifiers may revealed dwarfdump tool. know how uuid's generated , information may encoded within them? almost they're generated corefoundation uuid machinery, creates them based off of mac address of ethernet card, timestamp, , other miscellaneous information. can generate own uuids running uuidgen . information encoded in them, that's there fragments of mac address. pretty relevance has may theoretically possible determine multiple uuids generated on same machine, don't know if that's possible.

php looping array - html table -

i have array of n elements, of form: array ( array ("foo", "bar"), array ("foo", "bar"), array ("foo", "bar")... ) i loop on array , display them on html table. <? $bigarray = array( array("foo", "bar"), array("foo", "bar"), array("foo", "bar") ); ?> <table> <? foreach($bigarray $a) { ?> <tr><? for($j=0; $j <= 5; ++$j) { ?><td><?= $a[$j] ?></td><? } ?></tr> <? } ?> </table> the advantage of approach can prototype favorite html editor , plug commands in. note works when server supports short_tags.

What's the reason/primary benefit of jQuery 1.5's jqXHR? -

i'm curious, intentions of jqxhr wrapper? there improves development? it implements xhr-like functionality non-xhr transports (think jsonp, etc.) also, allows promises. best place read on right in docs: http://api.jquery.com/jquery.ajax/#jqxhr

ios - iPhone HTTP streaming server components -

hi setting http live streaming ios. rtsp stream on udp , pass on mediastreamsegmenter. questions are: -do need mac based server mediastreamsegmenter tool can job? if yes have alternatives? -can pass remote machine address mediastreamsegmenter store segmented files , index file? i cant afford server , mac server matter.... replies appreciated. you don't need mac server. in fact, if use amazon s3, can combine cloudfront rtmp streaming of files s3 user. check out: http://aws.amazon.com/cloudfront/#highlights you can pass stream address media stream segmenter, , you're go.

android - emulator: ERROR: the user data image is used by another emulator. aborting -

[2011-02-09 23:59:11 - timerproject] ------------------------------ [2011-02-09 23:59:11 - timerproject] android launch! [2011-02-09 23:59:11 - timerproject] adb running normally. [2011-02-09 23:59:11 - timerproject] performing acarin.timetracker.project.ezhil.timerproject activity launch [2011-02-09 23:59:11 - timerproject] automatic target mode: preferred avd 'ma_avd_2.3.1' not available. launching new emulator. [2011-02-09 23:59:11 - timerproject] launching new emulator virtual device 'ma_avd_2.3.1' [2011-02-09 23:59:31 - timetracker] new emulator found: emulator-5554 [2011-02-09 23:59:31 - timetracker] waiting home ('android.process.acore') launched... [2011-02-10 00:01:40 - timetracker] home on device 'emulator-5554' [2011-02-10 00:01:40 - timetracker] uploading timetracker.apk onto device 'emulator-5554' [2011-02-10 00:01:40 - timetracker] installing timetracker.apk... [2011-02-10 00:04:11 - timetrack

c# - WCF ResponseFormat JSON Returns Json in Fiddler, Xml in Chrome/Firefox! -

hi have wcf rest 4.0 project. reason have webservice should return json , if hit endpoint on fiddler thru firefox or chrome if type in address xml. whats going on??? thanks help! here's code. web service in question: [operationcontract] [webget(uritemplate = "", responseformat = webmessageformat.json, requestformat = webmessageformat.json)] public someobject [] getobjects() { ..... object code: [datacontract] public class someobject { [datamember] public string date { get; private set; } .... public string site { get; private set; } if using .net 4.0 framework, solution: http://karnicki.eu/2011/02/rest-wcf-net-4-0-service-with-json-jsonp-for-jquery/ wcf has jsonp support out of box little configuration required. basically need edit/add 2 config file entries, authenticationmode , standardendpoint, , voila, can view json response wcf

python - Labeling a Scale in Tkinter -

i'm working tkinter scale, selected value somewhere between 0 , 100, representing percentage. there way value displayed have % percent sign following it? i want following (roughly): 75% |-------------o----| currently cannot figure way add percent sign. help, or definitive "that not possible" appreciated. thanks. it's not possible options provided control. however, possible turn value off , use own string. since know value of slider , know length, can calculate pixel represents center of slider. information can place label widget @ appropriate place , put whatever string want in label.

Excel to dataTable -

i need fetch sheet excel datatable. first tried linqtoexcel library, fetched large numbers excel sheet exponential numbers. i'm talking big numbers "2352143523453452334544". if formated text work ok. after i've tried : oledbconnection con = null; system.data.datatable dt = null; system.data.datatable datatable1 = new system.data.datatable(); string constr = "provider=microsoft.jet.oledb.4.0;" + "data source=" + uploadfilename + ";extended properties=excel 8.0;"; string sql_xls; con = new oledbconnection(constr); con.open(); //oracledataadapter oda = new oracledataadapter(); //oraclecommand cmd = new oraclecommand("select * [sheet1$]", con); dt = con.getoledbschematable(oledbschemaguid.tables, null); string[] excelsheetnames = new string[dt.rows.count]; int = 0; foreach (system.data.datarow row in dt.rows) { excelsheetnames[i] = row["table_name"].tostring(); i++; } sql_xls = "select * [" + excels

c++ - What's the meaning of thread concurrency overhead time in the profiler output? -

i'd appreciated if experience of intel vtune amplifier tell me thing. recently received performance analysis report other guys used intel vtune amplifier against program. tells, there high overhead time in thread concurrency area. what's meaning of overhead time ? don't know (asked me), don't have access intel vtune amplifier. i have vague ideas. program has many thread sleep calls because pthread condition unstable (or did badly) in target platform change many routines works in loop below: while (true) { mutex.lock(); if (event changed) { mutex.unlock(); // break; } else { mutex.unlock(); usleep(3 * 1000); } } this can flagged overhead time ? any advice? i found documentation overhead time intel site. http://software.intel.com/sites/products/documentation/hpc/amplifierxe/en-us/win/ug_docs/olh/common/overhead_time.html#overhead_time excerpt: overhead time duration starts release of shared reso

java - How to Optimize JVM to utilize less resources -

i using apache tomcat 7.02 server.i created application using sphinx4 , deployed on apache tomcat server.since sphinx4 application requires lot of memory execute.so purpose alloted lot of memory java heap space(export catalina_opts="-xms1536m -xmx1536m"). server on have deployed server 64bit system debian lenny on it,along 2gb of ram. created servlet,post data it,get results... when run 10 users takes 8 minutes process if run 100 users simultaneously,thn shows on tomcat status free memory: 37.0 mb total memory: 1484.81 mb max memory: 1484.81 mb i tried using system.gc(),but did no gud.so there way through can check memory status of jvm , free when needed? you need determine resources being using. suggest use memory profiler , change program consume less memory. if using 64-bit jvm can use -xx:+usecompressedoops reduce memory consumption (it uses 32-bit references instead of 64-bit references) edit: if cannot tune application may worth considering u

plugins - Creating my own SWC file using Flex 4? -

is possible create , compile own .swc file using flex 4 / flash builder 4? don't have flash professional installed , based on people i've asked, made in flash professional. how can make own .swc file if i'm going use flex 4 / flash builder 4 instead? yes can. in flash builder , create new "flex library project". technically, name wrong because can create swc file without dependency flex framework.

c# - How to get all route-values after {controller}/{method} -

i render buttons in order change language following: <%: html.actionlink( "en", viewcontext.routedata.values["action"].tostring(), new { lang = "en" }, new { @class="tab" })%> this render me link follows: {...}\en\mycontroller\mymethod - problem left lose routing values, follow after method's name. how possible add them well? thanks tips! i use few handy extension methods: public static routevaluedictionary toroutevaluedictionary(this namevaluecollection collection) { routevaluedictionary dic = new routevaluedictionary(); foreach (string key in collection.keys) dic.add(key, collection[key]); return dic; } public static routevaluedictionary addorupdate(this routevaluedictionary dictionary, string key, object value) { dictionary[key] = value; return di

linux - Makefile: Perform specific command when one file was updated after another one -

i have makefile calls bash scripts , shell commands. 1 of scripts generates code (say, generated.h) file according code file (say source.h) - , want called if source.h updated after generated.h updated. (in pseudo code: if update_time(generated.h) < update_time(source.h) call generatecodefile.sh end if ) how can within makefile? thanks. generated.h: source.h sh generatecodefile.sh be aware that's literal <tab> character @ start of sh line.

Facebook App not showing in a page but showing in another, why? -

i've created facebook application , test fan page. added app fan page (test page) , created tab in page. when added same app page didn't create tab. know why? app tab name set correctly , not conflict other tabs. both pages have basic facebook apps added them , nothing else. am missing something? looks forgot set tab url field in app settings. once fixed it, removed application , re-added it. worked fine

java - enable jmxremote on windows -

i'm trying enable remote monitoring using jmxremote. when set options in '.bat' file, things ok (i can connect process using jconsole), fail when try when process ran service, although use exact properties use when process runs '.bat' file (e.g. -dcom.sun.management.jmxremote etc.) can please let me know missing? (please note, behavior , withouth password/access files, 'authenticate' , 'password' set true , false). thanks guy if specify only com.sun.management.jmxremote connection work long process monitored , monitoring tool run under same user. since services run under system account that's not case. you need specify port listen on enable connections other users: use com.sun.management.jmxremote. port this .

asp.net mvc - Moving global resources to custom folder -

i have asp.net mvc2 application need support not multiple languages, potentially multiple versions of each language. solve localization requirements using resx files in app_globalresources folder, , works long not need support multiple resource-sets same language. this issue because each customer shall able specify set of resources, , may use same language. my initial thought have file structure every customer has separate folder located under instance app_data. in customer folder put configuration files , resources. need way tell application should resources in particular folder instead of app_globalresources. so question is: doable, , have make work? bad way solve problem this, , if seems case: have suggestions better solution? will thankful input. i use custom resourceproviderfactory store resources in database. creating custom provider in specific folders should not hard if can distinguish different customers virtualpath.

scala - Type aliasing Java classes with statics -

suppose myclass class defined in java, , has many static non-static members. tried alias class (and associated companion object) in scala object myobject shown below: object myobject { import javastuff._ type myalias = myclass val myalias = myclass } scalac complains: error: object myclass not value val myalias = myclass how work around this? thanks. although works in pure scala class + companion object, it's not possible java's static methods, these don't belong interface. scala could , in theory, create object containing delegates static methods of class, doesn't currently. it's possible write compiler plugin if feel comfortable writing plugins. failing that, you'll either have create object full of delegates yourself, or cherry-pick few methods , pass them around functions.

Synchronize 2 SharePoint Libraries on Different Servers -

i need copy or synchronize 2 libraries between 2 different servers. here more details: 1- have infopath form submitted document library, lib #1. 2- infopath form published content type , lib #1 configured deal content type. 3- users have ability add new items lib #1. 4- @ end of each day, or may every hour or so, need copy newly created items or sync lib #1 library on different server. 5- content type available in both servers. i new sharepoint appreciate if can show me hints on how achieve that. clarification don't know route take, thinking of utilizing of these (if possible): 1- replicating database: use replication copy data 1 sharepoint database other 2- file system: not sure if forms saved in file system if are, copy forms 1 server another. 3- programatically: reading sharepoint server events. can program against list item added event , try copy item 1 server anther. 4- built in: may there built in tool not aware of can me copy items. why want ? if t

primary key - Identifying Sybase tables, fields, keys, constraints -

i'm trying set sybase query give me following output: table keytype keynumber column table1 pk 1 table1_id table1 fk 2 table2_id table1 fk 3 table3_id table1 fk 4 table4_id table1 unique 5 table1_abc table1 unique 5 table1_def in other words, need pk each table, , every foreign key has, every unique key (not key has more 1 element, such unique key above, identified having same keynumber). i'm guessing need use sysobject, syscolumns, syskeys , sysconstraints can't seem figure out how interlink. thanks karl this start: select t.name, case k.type when 1 'pk' when 2 'fk' when 3 'common' end, c.name sysobjects t inner join syscolumns c on c.id = t.id inner join syskeys k on k.id = t.id , c.colid in (k.key1, k.ke

Error in debugging app on iphone device -

please below error not able debug app on device says permission denied...please help! phasescriptexecution "run script" build/assistant.build/release-iphoneos/assistant.build/script-d5aa2ecc1261763800b909b0.sh cd /users/lharinathreddy/desktop/xcode/assistant setenv action build setenv ad_hoc_code_signing_allowed no setenv alternate_group staff setenv alternate_mode u+w,go-w,a+rx setenv alternate_owner lharinathreddy setenv always_search_user_paths no setenv apple_internal_developer_dir /appleinternal/developer setenv apple_internal_dir /appleinternal setenv apple_internal_documentation_dir /appleinternal/documentation setenv apple_internal_library_dir /appleinternal/library setenv apple_internal_tools /appleinternal/developer/tools setenv apply_rules_in_copy_files no setenv archs "armv6 armv7" setenv archs_standard_32_64_bit "armv6 armv7" setenv archs_standard_32_bit "armv6 armv7" setenv archs_universal_iphone_os armv7 setenv build_componen

php - Alternative to using setTimeout with AJAX? -

hey guys, there more efficient way this? setinterval('getallwords()', 2000); function getallwords() { $.ajax({ type: "get", url: "queries.php", data: "action=all", success: function(data){ dataarray = data.split('|'); $('#words').html(''); (var = 0; < dataarray.length; i++) { if ((dataarray[i]).length > 1) { $('ul').append('<li>' + dataarray[i] + '</li>'); } } } }); } elaboration (?) this connect every 2 seconds database , checks updated words, there easy way implement push request or minimise database activity? more info: my hosting doesn't support installing of ajax push servers , won't install 1 me :( if can't install push server, consider hack: run infinite loop sends answer ajax request once t

c - Is CLOCK_MONOTONIC process (or thread) specific? -

if time using clock_gettime(clock_monotonic,x), call yield (e.g. sched_yield()), clock_monotonic time again, difference in times include time program wasn't running (having yielded), or clock_monotonic track time during program executing? tests seem imply latter, i'd know sure. also, if clock_monotonic doesn't include time yielded, there monotonic timer (ie. 1 not subject jumps caused ntp) does? the answer maxim , comments answered second part of question, believe. expand on answer first part, posix 2008 states if monotonic clock option supported, implementations shall support clock_id of clock_monotonic defined in <time.h>. clock represents monotonic clock system. clock, value returned clock_gettime() represents amount of time (in seconds , nanoseconds) since unspecified point in past (for example, system start-up time, or epoch). point not change after system start-up time. in particular, note "the monotonic clock system". is, per-s

jquery - some identical classes, act in each -

i have section see 1 or more messages user must agree, should leave one, if accepted , there more shows following can not act on each of these classes separately then have container several equal classes html: <div class="container"> <p class="active"><span>1lorem ipsum dolor sit amet, consectetur adipiscing elit. praesent sagittis justo sit amet odio posuere fringilla. sed et nunc ligula. cras faucibus porttitor ipsum.</span> <a title="ver más mensajes" href="javascript:void(0)">siguiente mensaje</a> <div class="clear"></div> </p> <p><span>1 praesent sagittis justo sit amet odio posuere fringilla. sed et nunc ligula. cras faucibus porttitor ipsum, non accumsan sem varius mollis.</span><a title="ver mensaje anterior" href="javascript:void(0)">mensaje anterior</a> <div class="clear"><

HTML development tools -

possible duplicate: help on html , php development tools hi all, i new development in html code,please suggest tools develop html code. regards, raj any text editor can find on computer great start.

android - How can i recycle imageView by using imagepath -

here storing image paths database. in tabhost , if click find tab images should displayed. @ time outofmemoryerror coming. please me. important me. image s = pictures.get(i); tablerow imagetablerow = new tablerow(ctx); imagetablerow.setlayoutparams(new tablelayout.layoutparams(layoutparams.fill_parent,layoutparams.wrap_content)); imageview imageview = new imageview(ctx); log.i("neverforget","picture image path : " + s.getimagepath()); drawable d = drawable.createfrompath(s.getimagepath()); imageview.setimagedrawable(d); imageview.setid(i); imageview.setlayoutparams(new tablerow.layoutparams(100,100)); imageview.setpadding(0, 10, 0, 15); don't use drawable.createfrompath() bound load images @ native resolution. doubtless these large images, photos etc, , therefore require vast amounts of memory once decompressed, , hence oom errors. if you're asking them render small box, fully-sized in memory. you sh

How to subtract date/time in javascript? -

this question has answer here: how difference between 2 dates in javascript? 13 answers i have field @ grid containing date/time , need know difference between , current date/time. best way of doing so? this give difference between 2 dates, in milliseconds var diff = math.abs(date1 - date2); in example, it'd be var diff = math.abs(new date() - comparedate); you need make sure comparedate valid date object. something work you var diff = math.abs(new date() - new date(datestr.replace(/-/g,'/'))); i.e. turning "2011-02-07 15:13:06" new date('2011/02/07 15:13:06') , format date constructor can comprehend.

java - use Enumerations in for-each statements without RAM limitation? -

hi have 10 million values , getting enumeration in enhanced-for loop, blasts ram. there way iteration rather enumeration. i trying to find alternate collections.list() , collections.enumeration(). import java.util.collections; import java.util.enumeration; import java.util.iterator; public final class enumerations { /** * allows using of {@link enumeration} for-each statement. * implementation not using heap space , such able serve * virtually endless enumerations, while {@link collections#list} limited * available ram. result, implementation faster * collections.list. * * @param enumeration * original enumeration. * @return {@link iterable} directly calling original enumeration. */ public static final <t> iterable<t> iterable(final enumeration<t> enumeration) { return new iterable<t>() { public final iterator<t> iterator() { return new

asp.net - do not load custom actions assembly -

my setup project installs web site , executes custom actions using class library. class library copied bin folder of web site, , after iis tries load though isn't needed web site how. how prevent class library loading? maybe possible copy directory instead of bin? or maybe web.config can configured in such way prevent class library loading? i've moved assembly folder , solved problem.

debugging - How can I include the request.User details in Django's traceback email for a production site -

i include contents of request.user in context details emailed site admins when error occurs, traceback , request.get/post/cookies/meta any appreciated. because process_exception middleware gets passed request object, can add whatever info request.meta class errormiddleware(object): """ alter httprequest objects on error """ def process_exception(self, request, exception): """ add user details. """ request.meta['user'] = request.user.username

UML Tool for Moose Perl -

im starting working moose/perl , im searching uml tool create diagrams , representing moose oo system. worked astah (former jude) designed java oo system. can give recomend other uml tool work moose/perl? my 2 cents: i have written extension (a .xom file) sybase powerdesigner. tool has powerful metaclass editor can script vbscript , proprietary language, gtl. has large collections of customizable metaclasses , templates. my powerdesigner extension quite hacky , contains stale code didnt clean up. therefore haven't published anything. works me, , me. lessons learned, top of head: i wanted uml modeling , code-generation, want that, too? moose quite attribute-heavy uml approach worth doing in respect. didn't use roles much, tried map them interfaces anyway. i not satisfied how model relationships. lots of edge-cases , "impedance mismatches" of uml concepts , moose/perl concepts. (btw, whats moose equivalent of "association class"? ) nati

java - Trouble with Jersey MIME Type "text/xml;charset=UTF-8 was not found" -

why following exception when running program within jar bundle, not getting exception when executing within netbeans? com.sun.jersey.api.client.clienthandlerexception: message body reader java class javax.xml.bind.jaxbelement, , java type javax.xml.bind.jaxbelement, , mime media type text/xml;charset=utf-8 not found i building program maven , assembly plugin. mvn assembly:assembly what netbeans different when running "run file"? i've asked same question on jersey mailing (http://java.net/projects/jersey/lists) list , recieved working answer, leaves me answering on question here. have admit dont understand solution , reason problem. please fell free leave comments or new answer. the problem seems be, assembly plugin not correctly merging meta-inf files. undertand there needs renaming of descriptions or so!? instead of using assembly plugin maven use shade plugin! read problem , solution here: http://jersey.576304.n2.nabble.com/issue-with-

javascript - finding out if console is available -

i wondering, how can find out javascript if console object available? i have problem if forget remove debug output console.log('sthg') errors in several browsers, if there no firebug, or similar, active. thanks help next problem interested in informations console object. has documentation link, or so? standard? , on... check property exists member of window : if (window.console) { } next problem interested in informations console object. has documentation link, or so? standard? , on... check out firebug documentation console api ; chrome , safari implement most, not all, of methods listed there. there's no standard defining should in console, you'll need test each browser see if supports feature.

html - Image onLoad problem in IE -

in ie not scale down huge images. in fact, scales not all. scale them down setting small width , height attributes. how fix it? i follows: var $image = $('<img/>'); $image.attr('src', 'http://example.com/img.jpeg'); $image.load(function () { this.width = this.height = 100; }); something that. not images scaled down. and, every time reload page different images scaled down. i have found out matter is. please refer img onload doesn't work in ie7 ie 6&7 fire "load" if have image server -- don't if image in local cache. , jeremy wadhams wrote. if define width , height in html element, should work. in css, ie6 isn't standards compliant , results may vary. for best practices, shouldn't re-size images in browser, slows down , causes pixelation. make copy of images that's size want, , link these images full-size images, if that's appropriate. once you've done that, keep images away me, thanky

android - Trying to lock screen rotation when displaying dialogs -

i trying lock screen in whatever orientation user in when application launches dialog , unlocking when dialog dismisses. here lock , unlock code: // sets screen rotation fixed current rotation setting private void mlockscreenrotation() { log.d("####################", "screen orientation " + mcontext.getresources().getconfiguration().orientation); // stop screen orientation changing during event if (mcontext.getresources().getconfiguration().orientation == 1) ((activity) mcontext).setrequestedorientation(activityinfo.screen_orientation_portrait); else ((activity) mcontext).setrequestedorientation(activityinfo.screen_orientation_landscape); // switch (mcontext.getresources().getconfiguration().orientation) // { // case configuration.orientation_portrait: // ((activity) mcontext).setrequestedorientation( // activityinfo.screen_orientation_portrait

c++ - Braces After Initialization Lists -

class foo { foo(double initvalue): storeddouble(initvalue) { } double storeddouble; } is there syntax allow me skip out on curly braces after initialization list? know it's minor thing, i'd concise possible in code. no, because foo( double initvalue ) method , methods must have opening , closing braces.

c# - Get Apple Keychain to recognize Bouncy Castle .NET created PKCS12 (.p12) store -

our organization manages stable of ios applications multiple clients, means dealing lot of different developer identity certificates , push notification certificates. i have had success bouncy castle c# crypto api in simplifying management of certificates , private keys push notifications, essentially eliminating need keychain our push notification certificates . i extend developer identity certificates. goal store private key , certificate information in database each developer identity. when new developer or build machine needs provisioned, server side code wrap of certificates , private keys 1 p12 archive 1 password imported target mac's keychain. unfortunately, mac keychain doesn't p12 files i'm generating. annoying since can import these files windows certificate manager fine. the code i'm using (the important parts) looks this: private byte[] getp12bytes(list<devidentity> identities, string password) { pkcs12store store = new pkcs12stor

Any method for accessing Windows COM methods using Java? -

i have application makes use of jna call functions hardware abstraction library in c++. 1 of supported hardware devices requires windows com subsystem initialized (via coinitialize or coinitializeex). does know java library can trick? know wrap windows functions, if had ready , tested, better. found 1 called jacob said documentation not , it's been long time since last updated it. thanks! we use com4j (for external processes excel) , swt com api (for embedded gui components). sometimes, use jacob, depends on control want control. don't implement idispatch interface correctly, , 1 of java com apis works. we had com components needed vb6 wrapper dll, in turn can called com4j, prepare headaches!

language agnostic - What is the advantage of RTSP over plain HTTP for static files? -

is there advantage of using rtsp serving static (not live stream) ts videos? http looks better purpose , triggers less bugs in client software. seeking works better, fast-forward playback works smoother. not require indexes. are there pitfalls when migrating rtsp plain http? usage of http media streaming, while sponsored apple ios products, not standard rtsp. there many http streaming implementations, issues mainly: inability pause; byte-range seeks. other this, http better many reasons. see this article .

how to post arrays to php -

solved, see final answer post complete details on worked me *original question , edits below: looking way set multiple sql items posted array. i'm pretty sure i'm using php5. here how set single one, don't know arrays in php mysql_query (" update comics set xml = updatexml(xml,'comic/pagenumber', '<pagenumber>'.$pagenumber.'</pagenumber>') id = $id ") or die(err(mysql_error())); i post idarray , newpagenumberarray flash where comic id of idarray[0] set pagenumber newpagenumberarray[0] , on. the arrays of equal length each other. of length, depending on number of altered page numbers in admin tool. for make separate php request per item, think cleaner send them out in 1 php request. * edit thanks patrick feel closer... still don't have quite right. flash sends these arrays idarr: 34,24 pagenumarr: 1,2 in php have function function changepagenumbers($con, $idarr, $pagenumarr)

javascript - Put Scripts at the Bottom -

yslow recommends should put scripts @ bottom of page. where should put them, after body end tag? my whole site runs in jquery, javascript files needed @ beginning. if move them end, might stop site working. being case, instead should put these scripts best performance? you should put them right before closing body tag. make sure scripts being initiated using $(document).ready() and should have no issues.

c++ - why is a scalar deleting destructor being called as a result of vector delete on Windows? -

i have code leaking on windows. runs fine on many unix platforms , leak occurs on windows. binary consists of exe, 1 dll , 2 static libs. exe links both dll , static libs, while static libs link dll well. leak occurs in exe code when instead of calling vector deleting destructor, reason scalar deleting destructor called. results in first object in array deleted while rest of array stays in memory. the leaking pseudo-code looks this: class myclassfromexe : public mybaseclassfromdll { public: classfromdll* m_arr; myclassfromexe(unsigned int size) { m_arr = new classfromdll[size]; } ~myclassfromexe() { delete [] m_arr; } }; void func() { myclassfromexe obj(3); } when func() finishes , destructor called see destructor of first object in m_arr called. debugger see done scalar deleting destructor , not vector deleting destructor. explains why first object destroyed. need understand why scalar deleting destructor called when delete [

java - Centered JLabel inside JTable -

how can display centered text or similar inside jtable if there not results after query? thank all. i wouldn't show label inside jtable, instead jtable. try removing table element container, , adding jlabel message. when user runs query, positive results, opposite way (remove label, add table)

javascript - many facebook like buttons on a page, asynchronously -

i'm building wall of people who've written messages on our site. each message, want include facebook button. facebook's implementation include script tag before building fb:like tag. <script src="http://connect.facebook.net/en_us/all.js#xfbml=1"></script> <fb:like href="http://example.com/messagewall.aspx/fan/222" show_faces="false" width="250"> </fb:like> i tried approach, because i'm showing 121 people on page @ time, page performance is, shall say, sub-par. can't believe have include script tag each time. i'm trying now, implement asynchronous way of doing this. i've tried this: (function() { var e = document.createelement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_us/all.js#xfbml=1'; var s = document.getelementsbytagname('script')[0]; s.parentnode.in

indexing - SQL Server non-clustered Index never shows up in execution plan -

Image
i have database table called tbl_event non-clustered indexes idx_event_folder , idx_event_time defined as: create nonclustered index [idx_event_folder] on [dbo].[tbl_event]([nobjectid] asc) create nonclustered index [idx_event_time] on [dbo].[tbl_event]([tetime] asc) i ran following simple queries , got execution plans displayed directly underneath: query 1: select * tbl_event tbl_event.nobjectid = 1410000 order tetime query 2: select * tbl_event tbl_event.nobjectid = 1410000 my question is, why index on nobjectid never utilized? expect there index seek or scan when nobjectid specified in clause of these select statements. understanding of analysis incorrect? you in comments there 18325170 rows in table, 30 of them have nobjectid=1410000. even if idx_event_folder index disabled cannot believe sql server choose plan amount of rows , line thickness indicates thinks dealing maybe 1 row not 18325170! so i'm pretty sure must have auto upd

ajax - JSONP question for making PUT/POST/DELETE cross-domain requests -

i've created restful api supports get/post/put/delete requests. want api have javascript client library, , thought use jsonp bypass cross-domain policy. works, of course requests. so started thinking how implement such thing , @ same time trying make painless use. i thought edit api implementation , check every http request. if it's jsonp requests (it has "callback" parameter in querystring) force every api method executed request, if should called other methods post or delete. this not restful approach problem, works. think? maybe solution dynamically generate iframe send non-get requests. tips? there's relevant points on pretty similar question here... jsonp implications true rest the cross-domain restrictions there reason ;-) jsonp allows expose limited, safe, read-only view of api cross domain access - if subvert you're potentially opening huge security hole - malicious websites can make destructive calls api including image href

android - WebView onPause method. Memory leak. -

on app have webview loads webpage contains online broadcast. problem once exit app seems keep getting data since free memory continues decrease. comes normal if close app manually. i have found topic here well: how pause flash content in android webview when activity isn't visible? i had problem described there: flash content kept working if app wasn't on screen (i hear it). it's fixed code shown there, said, keeps draining memory anyway.

css - Overriding :visited overrides :link :hover :active -

please consider these styles: a:link { color: blue } a:visited { color: red } a:hover { color: green } a:active { color: black } #special:link { color: pink } and markup: <a href="#">normal link</a> <a href="#" id="special">special link</a> i expect "special" link pink while keeping other colors. however, pink replaces other colors. why happening? how fix it? thank you. i believe has css priority order. because #special id, dwarfs element-level style applied. (this can proven in firefox firebug/chrome inspector , how inherited style sheets over-written id's style). though, considering there no "present style" applied :active, :visited, etc. stand reason these styles still un-affected. yet, making following change hover seems kick in gear: a:hover { color: green !important; }

ruby on rails - Setting up fake URLs locally that support subdomains -

i'm developing rails 3 app locally on mac. want test locally fake urls support subdomains, e.g. http://blah.example.com , http://blah2.example.com . how can set up? run favorite shell , terminal: sudo nano /etc/hosts add in new line: 127.0.0.1 *.example.com press ctrl+x save. make sure not delete lines there!

music - Integrate twitter into Tumblr -

i listen music online lot , bugs me of different sites allow "love", "favorite", "scrobble" there no hub can send them to. 1) want reference list later (make playlist) 2) want play list on streampad (queue , play playlist) my progress follows: have playlist on twitter - handle @noahstunes. can plug streampad becomes playable? my goal have dedicated page (on http://noahlucas.tumblr.com/radio if possible) allows music played. hmmm, short answer - knowledge anyways - no. the closest thing i've found might of use http://www.tumbltape.com hope helps.

c++ - Behavior of calling operator [] when no mapped value is assigned to the key -

i have this: #include <iostream> #include <map> int main() { std::map<int, int*> mapastring; int* teste = mapastring[0]; std::cout << teste << std::endl; if(!teste) mapastring[0] = new int(0); std::cout << mapastring[0] << std::endl; std::cout << mapastring[1] << std::endl; return 0; } in documentation @ gcc , cpluplus.com it's said called default constructor of element, when pointer declared without initializing it, value undefined. is guaranteed value returned null pointer when calling subscript operator([]) when there no mapped value assigned key , return type pointer? the "default constructors" of primitive types (including pointers) produce 0-filled memory, global variables. here relevant standard language (from dcl.init): to default-initialize object of type t means: --if t non-pod class type ( class ), default constructor t call