Posts

Showing posts from May, 2014

Git not recognizing rails plugin -

i installed table_builder plugin https://github.com/p8/table_builder , followed directions @ bottom titled for pre rails 3.0 table_builder: works great. the problem since checked out branch of it, when try commit git repo, doesnt think there files there.. git status diplays nothing, git add wont add files.. any suggestions how can committed? maybe cloned plugin directly own repository , have plugin repository within repository? a git repository default ignore other repositories , working directories located within it. if so, have (at least) 2 options: clone plugin elsewhere, , copy necessary files repository clone plugin repository , delete plugin's .git folder there other ways manage git-submodule i'm not expert on defer more knowledge.

.net - NLog: Log the user who called the application in a WCF application in IIS -

i have following scenario: a deployed wcf service running windows hosted service. wcf service used log specific events database (nlog v2). service uses basichttpbinding. a deployed web application (different server) under iis. application pool runs under network service credentials. web application authentication windows-integrated (active directory credentials). whenever call wcf console application can user identity system.threading.thread.currentprincipal.identity.name ; when call web application expect "domain\server$" thread identity name (which occurs expected). my problem is: i'd user called web application. i've tried set aspnetcompatibilityrequirements attribute in wcf service contract, ${asp-application} , ${aspnet-user-identity} , ${asp-request} parameters in nlog read null . httpcontext in web application ok, not being sent wcf. there's credentials property in nlog.logger class, it's read-only. does know how solve it?

html - jQuery add first part of div, then add last part of div seperatley -

i'm trying wrap following prices , text together, in 1 div. this have: <table cellspacing="0" cellpadding="0" border="0" class="theprices"> <tbody><tr> <td> <font class="text colors_text"> <b>msrp: <span class="priceis">$90.00</span></b> </font><br> <b><font class="pricecolor colors_productprice"> <font class="text colors_text"><b>burkett price:</b></font> <span class="priceis">$289<sup>.99</sup></span> </font> </b><br> <a href="a link">a link goes here</a> <table>a table stuff goes here</table> </td> </tr></tbody> </table> this trying get:

mongodb - Ruby datajob with mongoid -

i'm trying use ruby , mongoid in order extract data oracle database , mongodb in order perfom couple of operations on it. the question is: i created 'record' class includes mongoid::document , set fields, , have assigned data coming out of oracle database, , have bson objects stored in array. now question is: how save them? here's piece of code query = db.report # sequel object query.each |row| r = record.new #mongoid class r.directory_name = row[:directory_name] r.directory_code = row[:directory_id] r.directory_edition = row[:edition] r.last_updated = row[:updated] r.canvass = row[:canvass_id] r.specialty_item = row[:item] r.production_number = row[:prodnr] r.status = row[:exposure_status] r.scanned_date = row[:scandate] r.customer_id = row[:customer_id] r.sales_rep = row[:sales_rep_name] r.phone = row[:phone] r.customer_name = row[:customer_name] records

c# - Error 1001 An error occured in sending the command to the application -

com excel addin, c#, vs2008 error happens when install/uninstall addin. see error 1001 specified file can not found anyone know causes these , how fix? thanks i use windows installer http://msdn.microsoft.com/en-us/library/2w2fhwzz%28v=vs.90%29.aspx says if use [targetdir], should "[targetdir]\" or "[targetdir] ". use /filepath = "[targetdir]myinstallfile" in customactiondata not understand works time , fails if change including space or backslash, can't tell if fixes issue since issue not happen every time. has experience? i found , fixes issue though not sure ever use dde in program http://sympmarc.com/2010/02/04/microsoft-excel-error-there-was-a-problem-sending-the-command-to-the-program/

php - Call External Object in Class Function During Callback -

i've class has function check , creates table in database. in order need use wordpress $wpdb object. i need function run on first plugin activation, use function: register_activation_hook ( __file__, array( 'memorialcandles', 'dbinstall' ) ); the problem error: fatal error: using $this when not in object context in /home/xxx/xxx/wordpress/wp-content/plugins/memorialcandles/memorial-candles.class.php on line 77 the class code: <?php // global variables: global $wpdb; register_activation_hook ( __file__, array( 'memorialcandles', 'dbinstall' ) ); /** * class: memorialcandles * * provides skeleton plugin , handles queries , action. * * @author dor zuberi <dor@zubri.me> * @copyright 2011 dor zuberi * @license http://www.php.net/license/3_01.txt */ class memorialcandles { // variables /** * @var string stores plugin direction - rtl or ltr. */ private $plugindirection; /** *

ruby - Rails devise help routing error No route matches "/sessions/user" -

when login on page automatic go route: http://localhost:3000/sessions/user and error: routing error no route matches "/sessions/user" i have created controller named sessions_controller.rb in users folder here is: class users::sessionscontroller < devise::sessionscontroller def new redirect_to root_url, :notice => "you have been logged out." end def create user = user.authenticate(params[:login], params[:encrypted_password]) if user session[:user_id] = user.id redirect_to root_url, :notice => "logged in successfully." else flash.now[:alert] = "invalid login or password." render :action => 'new' end end def destroy session[:user_id] = nil redirect_to root_url, :notice => "you have been logged out." end end my route file: densidste::application.routes.draw match 'user/edit' => 'users#edit', :as => :edit_curren

opengl es - Android activity life cycle - restarting (destroying) app does not remove reference to (custom) listener? -

i have application using glsurfaceview , renderer. have set when user exits application via button call myactivity.finish(); this fine , can see activity getting calls onstop() , ondestroy(); the app works fine first time run when subsequently run have had problem motionevents. i handle motion events queuing them pool , having renderer access pool @ right time so: try { //get history first int hist = event.gethistorysize(); if (hist > 0) { //oldest first in list. (i think). (int i=0;i <hist; i++) { inputobject input = inputobjectpool.take(); input.useeventhistory(event, i); defrenderer.feedinput(input); } } //the current 1 still needs added inputobject input = inputobjectpool.take(); input.usemotionevent(event); defrenderer.feedinput(input); } and in renderer: synchro

Can I use CSS for Java Swing? -

is there way reuse css in application uses java swing ? http://code.google.com/p/flying-saucer/ flying saucer takes xml or xhtml , applies css 2.1-compliant stylesheets it, in order render pdf (via itext), images, , on-screen using swing or swt

database - Python, Pylons, and Sqlalchemy: Analyzing the Facebook Graph API -

i take data facebook graph api , analyze find out how close 1 person another. attempting use pylons framework sqlalchemy (right attached sqlite database) store information graph api can make available other applications via restful web service. wondering best approach analyzing data. for example, should create objects analogous nodes , edges in graph api (users, posts, statuses, etc.) , analyze them, store aftermath of analysis in database, perhaps uids of each node , connections other nodes? or should store less, , have database of users , close friends? or should go through step step , store each of objects via orm mapper in database , make analysis database after having filled it? what sorts of concerns go designing of database in situations this? how should objects relate/map model? should analysis taking place during whole process of grabbing data , storing it? i'd store as possible, dump can. try maintain relationships between nodes can traverse/analyze them

Compare decimal numbers in an alphanumeric value without preg_replace - PHP -

is possible compare decimal values value contains alphanumeric characters without using preg_replace or stripping out non-numeric values? for instance comparing these 2 decimal values ( ignoring letters) simple operator > : 'down0.1.5.3' 'down0.1.7.1' var_dump(version_compare('down0.1.5.3', 'down0.1.7.1')); var_dump(version_compare('down0.1.8.3', 'down0.1.7.1')); version_compare()

Python list confusion -

let's have following code: a_list = [[0]*10]*10 this generates following list: [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] then want modify first element in first list: a_list[0][0] = 23 i expected first element of list modified, first element of each list changed: [[23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0], [23, 0, 0, 0, 0, 0, 0, 0, 0, 0]] i managed find way represent data avoid why happening? why isn't first list chan

c# - How to use a custom Resource provider with Attributes? -

how can use custom method retrieve string resources , use on properties? example: public class friend { [required(errormessage = "invalid name")] [display(name = "friend's name")] public string name { get; set; } } the default resource provider (if set resourcetype / errormessageresourcetype ) class public property, resource files doesn't have generated class, plain xml. i have method resourcehelper.get(key) returns value expect. how can change use way of retrieving resources? here few different ways try in case. fourth approach sounds promising. http://carrarini.blogspot.com/2010/08/localize-aspnet-mvc-2-dataannotations.html approaches solve problem: writing custom build provider, compiles resources database. creating dynamic object, transforms property name key resource manager. extending attributes of data annotations. using t4 template generating class containing resources. [edit} for question regarding

Jquery Validate dropdown required if field empty -

i'm trying make dropdown required if #category field empty. thanks! jquery attempt #1: $("#uploaddocsform").validate({ rules: { name: { required: true, minlength: 2, maxlength: 255 }, cat_id: { required: function(element) { return $("#category").val() == ''; } } }, messages: { name: 'please enter <b>document name</b>.', cat_id: 'please select <b>category</b>.' } }); jquery attempt #2: $("#uploaddocsform").validate({ rules: { name: { required: true, minlength: 2, maxlength: 255 }, cat_id: { required: { depends: function(element) { return $("#category").val() == ''; } } } }, messag

ios - Add UIActivityIndicator to UITableView -

i have seen lot of explanation in other posts nothing works. i have uitableview takes few seconds populate rss feed. in viewdidload want start animating indicator. want end when data loads. does have solution doing through code , not through interface builder? take @ three20 library: https://github.com/facebook/three20 it has table view component need out of box. imagine it'll lot easier integrate trying recreate whole thing scratch

collections - c# implementation get range of values and union of these ranges -

i have situation explained in question: range intersection / union i need c# implementation (a collection maybe) takes list of ranges (of ints) , union of them. need iterate through ints in collection (also numbers between ranges) there library/implementation don't have rewrite myself? the simplest thing comes mind use enumerable.range, , treat different ienumerable standard linq operators. like: var list = enumerable.range(1, 5) .concat(enumerable.range(7, 11)) .concat(enumerable.range(13, 22)) foreach(var number in list) // obviously can use union , intersect well... can put ranges in list<ienumerable<int>> or similar , iterate on elements producing single list of elements: var ranges = new list<ienumerable<int>> { enumerable.range(1, 5), enumerable.range(7, 11), enumerable.range(10, 22) }; var unionofranges = enumerable.empty<int>(); foreach(var range in ranges) unionofranges = unionofranges.union(ran

android - SQLite Query in non case sensitive alphabetical order -

this question has answer here: how use sql order statement sort results case insensitive? 3 answers all want grab stuff in alphabetical order , ignore capital letters. db.rawquery("select " + catname + " "+tablename+" order "+catname+" asc collate nocase;", null); this code i'm using above, gives me sqlite exception saying collate syntax error. android.database.sqlite.sqliteexception: near "collate": syntax error: , while compiling: select artist testtable collate nocase asc collate goes before order direction: db.rawquery("select " + catname + " " +tablename +" order "+catname+" collate nocase asc;", null); but don't need asc -- that's default use: db.rawquery("select "+ catname +" "+ t

c++ - Qt based addSlashes version equivalent -

i wrote qt based php addslashes function like, wont see improvements, suggestions it. planing use function fill file hundred of insert query, more specific, going create php database dump like. qstring addslashes(qstring str) { qstring newstr; for(int i=0;i<str.length();i++) { if(str[i] == '\0') { newstr.append('\\'); newstr.append('0'); } else if(str[i] == '\'') { newstr.append('\''); } else if(str[i] == '\"') { newstr.append('\"'); } else if(str[i] == '\\') { newstr.append('\\'); } else newstr.append(str[i]); } return newstr; } i think i'd separate data code, like: std::map<char, std::string> reps; reps['\0'] = "\\\0"; reps['\'&#

jquery slideToggle - Call before slide -

can suggest how make call within slidetoggle before opens/closes? here situation: $('.accordion .d_row .c_row').live('click', function() { $(this).nextall('div.details').slidetoggle(function() { if($(this).is(":hidden")){ // } else { // } }); }); if call //do comment resides getss fired whilst element slides open. there way call, example, function first perform silde? cheers you can run code before calling slidetoggle .

entity framework - Why can't SQL Server handle cascading deletes for two foreign keys pointing to the same table? -

i'm using entity framework - code first, , i've run issue have disable cascading deletes particular foreign key. here entity class: public class challengematch { public int id { get; set; } public int challengerclubmemberid { get; set; } public int challengeeclubmemberid { get; set; } public bool challengerwon { get; set; } public string score { get; set; } public virtual clubmember challengerclubmember { get; set; } public virtual clubmember challengeeclubmember { get; set; } } if allow code first generate database table default settings (which includes cascading deletes), throw exception when tries generate database objects. if add following code dbcontext class, no longer exception, cascading deletes somewhat work: protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.entity<challengematch>() .hasrequired(cm => cm.challengeeclubmember) .withmany() .hasforeignkey(cm

android - Unable to download .jpg image and set into imageview using asynctask -

have problem. can't seem download .jpg image url source , set imageview inside listview. gives me error "nullpointerexception". using imagedownloader class here . this lines of code download image files: oncreate()... (int = 0; < listdata.size(); i++) { imageisbn = listdata.get(i).get("coverimage"); string isbnurl = "http://lib.syndetics.com/index.aspx?isbn=" + imageisbn + "/sc.gif&client=tpoly&type=xw12"; imageview iv = (imageview) findviewbyid(r.id.cover_image); imagedownloader.download(isbnurl,iv); } i'm thinking maybe due setcontentview(r.layout.list) that's producing error since listview , imageview link in xml file. below logcat: 05-11 09:26:58.063: error/androidruntime(305): java.lang.runtimeexception: unable start activity componentinfo{com.tplibrary/com.tplibrary.search.searchresults}: java.lang.

java - InputStream returns -1 before end of file -

i'm streaming file server , streaming out socket (basically stream proxy). being used buffer song. once buffer full, no more data read socket until buffer empties out. however, once more data read, inputstream read x more bytes, return -1 signaling end of file, when not. there timeout happening? here's example code: inputstream data = realresponse.getentity().getcontent(); ...some code... int totalbytes = 0; int count = 0; // start streaming content. byte[] buff = new byte[1024 * 50]; while (isrunning && (readbytes = data.read(buff, 0, buff.length)) != -1) { totalbytes += readbytes; log(count + ": buffer:" + buff + " readbytes:" + readbytes + " total:" + totalbytes); client.getoutputstream().write(buff, 0, readbytes); log("finished write"); count++; } an example of log like: 0: buffer:b@45030a50 readbytes: 16164 total: 16164 1: buffer:b@45030a50 readbytes: 16384 tot

Try/except database query in django -

i checking user's submitted email address against 2 lists database -- list of authorized domains , list of authorized email addresses. currently, if neither found, rainsing doesnotexist exception. how handle if neither found? here code have in views.py -- def register(request): if request.method == 'post': form = userform(request.post) if form.is_valid(): cd = form.cleaned_data try: email_list = emaillist.objects.get(domain=(cd['email'].split('@')[1])) except: email_list = emaillist.objects.get(email=cd['email']) # need except if neither works validator. network= network.objects.get(network=email_list.network) user.objects.create(name=cd['name'], email=cd['email'], network=network) return httpresponseredirect ('/user/view/') else: form = userform() return render_to_re

javascript - How to auto organize the scripts used by custom Facelets components? -

for example, have created custom ui components, depend on jquery-min.js , depend on jquery ui , depend on jstree , depend on dojo , etc. i can import required libraries in each xhtml files: file1.xhtml <script src="jquery-min.js"></script> <script src="jquery-ui.js"></script> <script src="jstree.js"></script> <my:tree> ... </my:tree> file2.xhtml <script src="jquery-min.js"></script> <script src="jquery-ui.js"></script> <script src="jquery-ui-dialog.js"></script> <script src="jquery-ui-autocompletion.js"></script> <my:autodialog> ... </my:autodialog> file3.xhtml <script src="jquery-min.js"></script> <script src="dojo.js"></script> <my:dojostuff> ... </my:dojostuff> this inconvenient, have know component depends on library, , dependencies of depe

flex - How to open PDF in background with HTMLLoader? -

i created application flex , open large pdf file, when show pdf file slow. anybody, know solution open pdf in background htmlloader? thanks read question , reply. you can not run multiple-threads/background-process in action script, way around pseudo-threading, wont work in every situation, for problem think should manage in wrapper(html,jsp,aspx) using multiple swf, mean separate swf load pdf hopes helps

printing - TCL - How to print on the screen th messages that where printed during execution of exec command? -

say have want execute script or , executable file printing runtime output of execution. when do: set log [exec ./executable_file] puts $log then waits long time , prints @ once. want runtime printing. how can this? not perfect (as require writing external file): set log [exec executable_file | tee log.txt >@stdout] the output displayed immediately, @ same time, saved 'log.txt'. if don't care saving output: set log [exec executable_file >@stdout]

javascript - using xsl:stream of XSLT 2.1 -

i have javascript converts applies xsl xml. need use xslt 2.1 in order use feature xsl:stream. now script follows : main(); function main() { if ( wscript.arguments.length != 3 ) { wscript.echo("usage: runtransform.js <xslfilename> <xmlfilename> <outputfilename>"); wscript.quit(); } var xslfilename = wscript.arguments.item(0); var xmlfilename = wscript.arguments.item(1); var outputfilename = wscript.arguments.item(2); var doc = loaddom(xmlfilename); var xsl = loaddom(xslfilename); var str = doc.transformnode(xsl); var ado = new activexobject("adodb.stream"); ado.open(); ado.position = 0; ado.charset = "utf-8"; ado.writetext(str); ado.savetofile(outputfilename, 2) } function loaddom(file) { var dom; try { dom = makedom(null); dom.load(file); } catch (e) { alert("error" + e.description); } return dom; } function makedom(progid)

ipad - Draw a line when user touch the Uiimageview -

i working on project in have added uiimageview show image selected user. requirement if user want crop images can touch image according crop requirement. when user cropping image line should draw @ place user has touched. know uitouch class use it. unable it. a couple of possible solutions. 1) create custom uiview contains uiimageview it's subview. make uiimageview same size custom uiview. add code detect touches on custom uiview , draw lines on top of uiimageview subview. 2) create custom clone of uiimageview draws image first 'background' , detects touches , draws lines on top of image. also make sure have userinteractioneabled set yes on view receiving touches.

c# - address validation global solution -

suppose user fillup form germany address country choose uk. how can validate address there if user choose country uk want user has write uk address other detail. how country. there ip available. need idea. thanks without full details of formats of addresses of both countries (and if have support more, need details of each country), not able validate properly. even detail, countries have such similar formats not able tell 1 address belongs to. your best bet use address verification library/service.

android socket connection -

i have created client-server wi-fi app. problem when server connection lost, not throws io exception during read/write operation in socket. how can identify server connection lost within app? thanks in advance. you can use this private boolean checkinternetconnection() { connectivitymanager conmgr = (connectivitymanager) getsystemservice (context.connectivity_service); return conmgr.getactivenetworkinfo().isconnectedorconnecting(); } i hope you.

c# 3.0 - function overloading in C# -

in c++ , compiler used name mangaling differntiate function overloaded.in c# how function overloading handled the signature of method used (types , numbers of parameters) distinguish different overloads. see this , this (rather dated, still pretty accurate) articles on msdn.

c# - Creating sub menus (folders) under the Administration menu in SAP business one 8.81 -

i developing payroll add-on sap business 1 8.81. can able add menus below last menu item comes sap application i.e. reports. trying add setup submenu payroll add-on under administration/setup menu of sap. does know how this? the code below shows how add menu's below reports menu of sap. it in c# , file name gui.cs ocreationpackage = ((sapbouicom.menucreationparams)(app.createobject(sapbouicom.bocreatableobjecttype.cot_menucreationparams))); omenuitem = this.app.menus.item("43520"); string spath = application.startuppath; //parent menu ocreationpackage.type = sapbouicom.bomenutype.mt_popup; ocreationpackage.uniqueid = "eim_payroll"; ocreationpackage.string = "eim payroll"; ocreationpackage.enabled= true; ocreationpackage.position = 15; ocreationpackage.image = spath + @"\eim_payroll_icon.bmp&q

html - Delphi & CSS - box model question -

Image
i using windows based program, coded in delphi, generated html (and can restrict browser msie 7 +). i need absolute, pixel perfect wysiwyg. however, having text-wrap problems. what looks in delphi -- ----------------- | aaaa bbb ccc ddd | -------------------- looks in browser (both ms ie , ff. although targeting msie only, using ff have access firedebug) -------------------- | aaaa bbb ccc | -------------------- ddd now, delphi has object inspector which allows me precisely set control's top/left/width/height , when generating html, use css positioning of each control on form. e.g. <fieldset style="position: absolute; top: 56px; left: 32px; width: 185px; height: 13px; "> <legend> </legend> <div style="position: absolute; top: 0px; left: 0px; width: 179px; height: 13px;"> label1 000 111 222 aaa bbb cccc dd </div> </fieldset> but since getting text wrap guess overlooking something, sett

jsf - <h:inputText> render problem in a form -

i have question rendering simple <h:inputtext> value. when write <h:inputtext id="username" value="#{userbean.user.username}" /> it's output is <input id="form:username" name="form:username" type="text" /> is there way output without form:xxx this? <input id="username" name="username" type="text" /> also minlength not working <h:inputtext> . have idea without writing javascript each data in form? yes it's possible. should add prependid attribute inside h:form <h:form prependid="false" id="form1"> won't have prefix form1 </h:form>

flash - Load SWF files through YouTube -

would possible embed external swf file youtube video/swf? for example: http://www.youtube.com/player2.swf?loadexternalswf=http://www.pylon.ca/main.swf no. cross-domain data not permitted configuration in http://www.youtube.com/crossdomain.xml

javascript - Reconnection in socket.io problem in `socket.on('message',function(){})` -

i have socket.io connection connect server , client, work fine. when try reconnect on disconnect server connected socket.on('message' doesnt fired more. checked server side pushing message. please suggest me thing i out of ideas now . sure problem on client side socket.on message client side code var socket = new io.socket('some host name',{port:80,remembertransport:true}); socket.on('connect', function(){ clearinterval(socketinterval); }); socket.on('message', function(obj) { alert("meg server"); }); socket.on('disconnect', function() { socketinterval=setinterval("socket.connect()",5000); }); socket.connect(); it appear "problem" on server side. server has 2 ways send messages client (emit , broadcast). if doing 1 one message, people use emit. assuming built chat server stores sessionids of client. works fine initial connection because server has correct sessionid, let's co

Android :- Problem in getting response from a https request ,the second time the request is posted -

i'm trying data web service https://..... problem proper response first time request made if request made there no response. log shows once "freeing openssl session". here postonserver code. public static string postdataonserver(string getrequest) throws ioexception { log.e("request : ", getrequest); try { url url = null; httpurlconnection con = null; try { url = new url(getrequest); con = (httpurlconnection) url.openconnection(); con.setrequestmethod("get"); con.setusecaches(false); con.setdooutput(true); con.setdoinput(true); con.setrequestproperty("user-agent", "test-ssl"); con.setrequestproperty("connection", "close"); con.connect(); } catch (ioexception e) { log.e("ioexception : ", e.tostring());

caching - Varnish and ESI, how is the performance? -

im wondering how performance of th esi module nowadays? i've read posts on web esi performance on varnish slower real thing. say had page on 3500 esi includes, how perform? esi designed such usage? we're using varnish , esi embed sub-documents json documents. response our app-server looks this: [ <esi:include src="/station/best_of_80s" />, <esi:include src="/station/herrmerktradio" />, <esi:include src="/station/bluesclub" />, <esi:include src="/station/jazzloft" />, <esi:include src="/station/jahfari" />, <esi:include src="/station/maximix" />, <esi:include src="/station/ondalatina" />, <esi:include src="/station/deepgroove" />, <esi:include src="/station/germanyfm" />, <esi:include src="/station/alternativeworld" /> ] the included resources complete , valid json responses on own.

javascript - jQuery Tools Tooltips does not work simply by an outer div having position: relative? -

a third party jquery tooltip jquery tools tooltips: tooltips done right . can breaking having outer div position: relative ? this 1 works: http://www.topics2look.com/code-examples/jquery-tools-tooltip-bug/this-works.html just adding position: relative outer div (the 1 blue border), , tooltip gets massively misplaced (by whatever amount header div pushes down): http://www.topics2look.com/code-examples/jquery-tools-tooltip-bug/with-relative-position-it-does-not-work.html the quality of 3rd party open-source code. does jquery guru have fix quickly? requirement outer div must have position: relative or position: absolute 1 reason or another. think reason breaking jquery tools tooltip uses position: absolute position tooltip, without knowing absolute relative "nearest ancestor positioned ", css spec says. breaks, simple case. try using relative property (third bottom). $('#main-content').tooltip({ bounce: false, relative: true, //

Failed to access Java code from XUL/JavaScript -

this java file : import java.io.file; import java.lang.string; public class listfiles { public static void main(string[] args) { // directory path here string path = "d:/xmlfiles/"; string files; file folder = new file(path); file[] listoffiles = folder.listfiles(); (int = 0; < listoffiles.length; i++) { if (listoffiles[i].isfile()) { files = listoffiles[i].getname(); system.out.println(files); } } } } this js file : function display(){ el = document.getelementbyid("text"); el.addeventlistener("oncommand", display, true); //loading encryption class //alert('hffffi'); var myclass = cl.loadclass('listfiles'); // use same loader above var myobj = myclass.newinstance(); // pass whatever arguments need (they'll auto-converted java form, taking account liveconnect conversion rules) var files = myobj.string; alert('karthik works'+files); document.getelementbyid(&quo

database - How to see how tables are related with IBM System i Access for Windows? -

Image
how see how tables related ibm system access windows? id keys , on.. thanks you can access table definition access using database tool in iseries navigator. if looking complete relational overview recommend dbvisualizer , jtopen driver.

Java read values from text file -

i new java. have 1 text file below content. `trace` - structure( list( "a" = structure(c(0.748701,0.243802,0.227221,0.752231,0.261118,0.263976,1.19737,0.22047,0.222584,0.835411)), "b" = structure(c(1.4019,0.486955,-0.127144,0.642778,0.379787,-0.105249,1.0063,0.613083,-0.165703,0.695775)) ) ) now want is, need "a" , "b" 2 different array list. you need read file line line. done bufferedreader : try { fileinputstream fstream = new fileinputstream("input.txt"); bufferedreader br = new bufferedreader(new inputstreamreader(fstream)); string strline; int linenumber = 0; double [] = null; double [] b = null; // read file line line while ((strline = br.readline()) != null) { linenumber++; if( linenumber == 4 ){ = getdoublearray(strline); }else if( linenumber == 5 ){ b = getdoublearray(strline); } }

c# - showing confirmation alert message when tinymce while moving more page to another page -

i have few web user controls in using tinymce extender editor.. , calling control in 1 aspx file on different different btn click. i want, when edit mode , changing text in editor , without saving if leave page must ask , show confirmation alert msg want save text. how it. on ascx file diagnosis: <asp:textbox id="txbdiag" textmode="multiline" runat="server" width="100%" height="100px"></asp:textbox> <acr3s:tinymceextender runat="server" id="tinymceextender4" targetcontrolid="txbdiag" theme="full"> </acr3s:tinymceextender> </td> extender calling is using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.componentmodel; using system.web.ui.webcontrols; using system.globali

sql server - Impersonation failing for database connection -

i have sl4 app uses wcf communicate backend sql server 2008 database. 1 of wcf services needs connect database dedicated system account due database permissions required stored procedure called. have attempted implement solution using impersonation within service code e.g. int result = logonuser(username, domain, password, logon32_logon_network, logon32_provider_default, out _token); if (result > 0) { impersonateloggedonuser(_token); //code here call nhibernate data access code } my connection string service is: <add name="myconnection" connectionstring="data source=servername\instance;initial catalog=mydatabase;integrated security=sspi" providername="system.data.sqlclient"/> however, data access routine still failing following message: login failed user 'nt authority\anonymous logon'. the impersonation being ignored in database connection. ideas? change logon32_logon_network logon32_logon_netwo

hide - Hiding HTML code from users? -

i tried hide couple of element end users can not see when see page source. seems not possible because code downloaded , read browser. so, user find way read it. however, found websites hide part of source! take @ website: http://namechk.com/ . source code related sites list not there!! code html code? or else can hided? , 1 know way this? thanks it because page heavily relies on javascript. can (and browser does) download javascripts well. if dig them find out how page generated. you can obfuscate javascript don't see point in that. think html unique steal it?

visual studio 2008 - No source code available, catching exception in VS C++ -

i'm testing c++ code in vs 2008 (express) debug mode , own class throws exception. i've hooked visual studio break when particular exception thrown. works , sends me line exception thrown, along stack leading error. sometimes though, vs gets stubborn , says there's no source code available when i'm trying break debug execution. asks if may show assembly instead, that's not me anyway! it's in own code, since it's own exception that's being thrown. how can visual studio recognize "missing" source file again? i have see vs when there uncommited save in source code file. asks more recent. stop code, save , rerun. phil

drupal - Username as a path -

i have user's name part of url, e.g. mysite.com/username. should redirect user profile. use profile 2 , pathauto , not sure how this. with pathauto, have configure user paths user token, e.g. [user:name] .

java - Build Deployment basics -

i more ui dev , less java...so, understand following things mean; 1. build deploy (is folder coped server , if yes, there class files in there,...) 2. exploded build mean? if explain me in easy language (and not extremely technical), great... also online resources in simple language helpful.. thank you. build deploy you build application packaging , deploy on server. for example if web app pack in war file , put war file on server webapp tomcat (dir differs server server) , start server deploy it.

Anyone programming using Necessitas (Qt for Android)? -

i working necessitas (qt android). run fine. now, trying connect dalvik jvm use of android api (gps example). i'm trying java environment using jni: jnienv *currenv; currenv = 0; if (m_javavm->getenv((void**)&currenv,jni_version_1_4) == jni_ok) { qdebug() << "getenv passed"; } else { qdebug() << "getenv failed"; } m_javavm pointer virtual machine used necessitas. the problem getenv failed when run application in android virtual device. any appreciated! i answering ow question: this happens because getenv gets current env. while need to new env like: if (currvm->attachcurrentthread((void **)&currenv, null)<0) { emit error("cannot attach current thread vm"); }

controls - How do I create a checkbox without the box (just the check) in Silverlight programmatically? -

as silverlight newbie, want create boxless readonly checkbox in silverlight4 show green checkmark. don't manage box invisible/transparent or make checkmark green, stays grey. what tried: cbstatus = new checkbox(); cbstatus.isenabled = false; // read cbstatus.visibility = system.windows.visibility.visible; cbstatus.background = new solidcolorbrush(colors.transparent); cbstatus.borderbrush = new solidcolorbrush(colors.transparent); cbstatus.foreground = new solidcolorbrush(colors.green); thanks ideas! you'll need override default template. add following style app.xaml resources starting point:- <style x:key="borderlessreadonlycheckbox" targettype="checkbox"> <setter property="background" value="transparent"/> <setter property="foreground" value="#ff000000"/> <setter property="horizontalcontentalignment" value

java - JAXB - Binding element to Set instead of List -

is there way make jaxb generate collection set instead of list defined element? for example generating set of books xsd: <xs:element name="collection"> <xs:complextype> <xs:sequence> <xs:element name ="books"> <xs:complextype> <xs:sequence> <xs:element name="book" type="booktype" minoccurs="1" maxoccurs="unbounded"/> </xs:sequence> </xs:complextype> </xs:element> </xs:sequence> when using following bindings.xml <jxb:bindings schemalocation="schema.xsd"> <jxb:bindings node="//xs:element[@name='shop']/xs:complextype/xs:sequence/xs:element[@name='books']"> <jxb:property collectiontype="java.util.hashset" /> </jxb:bindings> </jxb:bindings> a list of books concret hashset implementation generated: lis

wpf controls - WPF repaint issue -

i having issue repaint of wpf control. the wpf control added elementhost.child windows form. when windows 7 goes powersave mode , brought normal (by moving mouse or key press on keyboard), rest of windows form controls repainted, wpf part not repainted(and win 7 background visible in area). on minimize , maximise of application, wpf part repainted. anyone has idea problem? the solution issue provided in msdn magazine while back. shows how can make wpf applications "power-aware" i.e. respond power notifications. it's amazing article , "must-read". check link: make wpf apps power-aware you can browse source code online or download here: code poweraware technologies used: wpf .net framework 3.0 windows vista / windows xp

batch file - java -cp on Windows problem -

can please tell me why java command in .bat file won't run java program on winxp? have jar files in folder called lib , class files in package folder mypackage. java -cp ".;.\lib\poi-3.7-20101029.jar;.\lib\jsr173_1.0_api.jar;..." mypackage.myclasswithmain i have tried sorts of things no avail. classnotfound error program attempts use of classes in jar files. so, think there's wrong -cp option. find main(). i want give program doesn't know thing computers, want them able double-click .bat file , go. i wrote on mac without problem. i bet moderator going slap me upside head question, did search extensively answer this. thanks you! john sorry, should have put in entire command line: java -cp ".;.\libs\jsr173_1.0_api.jar;.\libs\poi-3.7-20101029.jar;.\libs\poi-ooxml-3.7-20101029.jar;.\libs\poi-ooxml-schemas-3.7-20101029.jar;.\libs\resolver.jar;.\libs\xbean.jar;.\libs\xbean_xpath.jar;.\libs\xmlbeans-qname.jar;.\libs\xmlpublic.jar" excelsifte

numbers - Xcode Using Exponents -

this simple question, variable "side" divided square of variable "curnum". currently, code looks like side = inputnum/(curnum^2); however, gives me error "invalid operands binary ^" how can use exponents? try pow(curnum, 2) should work......

xamarin.ios - switching between uiviewcontrollers without a UI navigator control -

i want switch between 2 uiviewcontroller classes programmatically without ui control uitabbarcontroller adds ui application. my main loads first view controller addsubview. vc1 = new viewc1(); window.addsubview(vc1.view); window.makekeyandvisible (); i can load second viewcontroller first 1 presentmodalviewcontroller vc2 = new viewc2(); presentmodalviewcontroller(vc2, true); but need switch , forth, , release old viewcontrollers save memory. best way this? dismissmodalviewcontrolleranimated(false); in 2nd view controller isnt releasing memory , dont want modal "windows" doesnt seem optimal. have custom ui tabbar controller not wanted. you can in simple code. can't release view controllers required handle user interactions such button tap events etc. adding view window preserve view instance. if release view controller instance, bad access error or unrecognized selector error. so let main code be if(vc1==nil) vc1 = new

c++ - CUDA statically allocating data on device -

i've been trying allocate variable can accessed each kernel function. attempt code attached below, won't compile cause darray can't viewed accessed kernel. in c++ place variable @ top or declare static accessed in every scope through out program. __global__ void storethreadnumber() { darray[threadidx.x] = threadidx.x; } int main( int argc, char** argv) { unsigned __int8 array[16] = { 0 }; unsigned __int8 darray[16]; for( __int8 position = 0; position < 16; position++) cout << array[position] << " "; cout << endl; cudamalloc((void**) darray, 16*sizeof(__int8)); cudamemcpy( darray, array, 16*sizeof(__int8), cudamemcpyhosttodevice); storethreadnumber<<<1, 16>>>(); cudamemcpy( array, darray, 16*sizeof(__int8), cudamemcpydevicetohost); for( __int8 position = 0; position < 16; position++) cout << array[position] << " "; cout << en

java - ASN.1 Encoding-Decoding -

i developing client-server program, client in java/c , server in c. have transport cryptographic data(like client should pass data server encrypt/decrypt, compute digest etc) , server has return result client. in scenario, realize importance of using transport protocol identify data , pass data efficiently. with regard, question is: asn.1 protocol use? know supported bc(on java) , openssl on c. idea transport data between client , server using asn.1 notation? can please give me starting points this? if have better idea of existing protocol please let me know. thanks!! what bc , openssl support small part of asn.1. in fact long time there no full asn.1 implementation available, @ least public. telcos , telephone equipment manufactors have rather complete asn.1 implementations. @ moment advanced asn.1 implementation available public developed part of osmocom project, harald welte blogged it: http://laforge.gnumonks.org/weblog/2011/04/12#20110412-mapv1_available and

language agnostic - How to make an Ubuntu application integrated? -

Image
i'm designing application ubuntu , make feel natural , integrated in os. available libraries, guidelines , frameworks make application look&feel native on ubuntu/unity desktop? don't exclusively mean gui toolkits, features quicklists in unity: this page on ubuntu wiki place start. lists lot of desktop integration tools , libraries. here of important ones: appindicators - these indicators sit in tray unity lenses - icons in screenshot

eclipse CSS file formatting -

i'm trying make eclipse format css files way... currently i've got sth that: .class{ display: none; sth: other; } but make sth that: .class { display: none; sth: other; } can this? i found in preferences / web / css files / editor can disable "insert line breaks between props" other think somewhere in sources of ecl. if know -- fix implementing own plugin ecl.