Posts

Showing posts from April, 2013

python - Linecache adding an extra line to the line that i get -

when try line using linecache in python. loginpass = raw_input("> ") if loginpass == linecache.getline('password.txt', 1): the line gets returns line. if line 1 "test" it returns "test " it worked earlier in code after adds line after it. this normal; reading lines file includes line-ending newline character. strip off: linecache.getline('password.txt', 1).rstrip('\n') i'm more concerned you're storing password in plain text, though....

vbscript - Reading few bytes from file and writing to text file using batch -

is possible make batch file or vbs read few bytes binary file , saves them file readable text? (eg read 4e 50 44 -> save npd) exapmple file bin [start of file]8bytes of rubbish 24 bytes need (readable text) rest of file[eof] you can try frank's hex editor: https://groups.google.com/forum/?fromgroups=#!searchin/alt.msdos.batch.nt/hexeditor/alt.msdos.batch.nt/q84l84c2q8q/cjbkadikxfcj with command cerutil -decodehex myfile myfile.hex can see file in hex , , process it.with encodehex can convert hex data text.

sorting - Is it true or false that, for any algorithm, its average-case performance is always better than the worst-case performance asymptotically -

i'd think true, i'm not confident in answer. there algorithm has equal running time in both average , worst case. i'm not sure if answer true then. calculating 1+1=2 o(1) in best, average, , worst case. a less trivial example: determining length of linked list of length n takes n steps in cases, it's o(n) in cases.

css - Add opacity to overflow in slider -

i have slider in home page. works fine, i'm trying overflow opacity in 0.4 example. i'm using jquery cycle in drupal 7. code using. $('.view-slider-sports .view-content').cycle({ fx: 'scrollleft', speed: 'slow', timeout: 5000, next: '.next2', prev: '.prev2', delay: -1000, }); the idea have images displaying on side of "principal image". normally, have 'other images' using overflow:hidden . how can display images apply opacity images in side of slider?

performance - Memory and CPU impact when a DLL is embedded inside a .NET DLL / EXE? -

we have dll distribute has external dependencies on other dlls. rather risking missing dlls or having potential mix-and-matching situations, embed dlls inside our own dll/exe , load @ runtime satisfy runtime linking. question: a) between embedding dll inside our .exe/.dll , loading memory @ runtime and keeping dll separate file on file system , having system load us which approach consumes more memory , approximately how much? b) have better approach above? item #3 in details below. details on our process interested: register assemblyresolve event @ portion know runs before code in assembly called (eg: init time) public void someinitcode() { ... appdomain.currentdomain.assemblyresolve += (sender, args) => { string[] assemblydetail = args.name.split(','); var assemblyname= assemblydetail[0] + ".dll"; var thisassembly = assembly.getexecutingassembly(); var allresourcenames = thisassembly.getmani

java - Dynamically accessing a button when I know the button number -

nine jbuttons declared : private javax.swing.jbutton jbutton1; private javax.swing.jbutton jbutton2; private javax.swing.jbutton jbutton3; private javax.swing.jbutton jbutton4; private javax.swing.jbutton jbutton5; private javax.swing.jbutton jbutton6; private javax.swing.jbutton jbutton7; private javax.swing.jbutton jbutton8; private javax.swing.jbutton jbutton9; i have had button array doesn't suit application.during program run want dynamically access button when know button number.like @ instance want button number 5 , settext("x") . there way can ? jbutton array have solved problem doing : buttonarray[5].settext("x") but told, overall doesn't suit application. accessing button number 1 thing. if there other way this,please mention. create function , write switch statement many number of jbuttons. pass number function , return appropriate nth number of jbutton object. possible way in given circumstances. there no other way in jav

FilePicker.io security - Is API Key required when using policy and signed policy -

i have security question regarding using pick widget. i had assumed if supplied data-fp-signature , data-fp-policy not need supply api key. when don't supply api key following javascript error "uncaught filepickerexception: api key not found" i have verified generated policy , signed policy match filepicker.io test harness. the api key necessary letting filepicker.io - policy , signature ways of verifying ware, have indicate in first place api key (for instance, can security secret , verify signature hash correct)

Best place to store data / settings for a .net Service and a GUI Frontend -

i have program runs service , runs simultaneously service front end. what best strategy storing files , data both these instances. the program runs in 3 modes :- completely service service , front end gui (ie 2 instances) gui in cases, files , configuration need have create / read / write access , accessible in every other mode applicationdata, localapplicationdata, seem user specific, , don't want service run under user account commonapplicationdata, think has restrictions general users under uac commonprogramfiles programfiles has restrictions general users under uac however last 2 examples there options of setting permissions on install does have elegant solution this, or can point me in right direction thanks the %allusersprofile% environment variable should suit needs. points c:\documents , settings\all users on winxp , c:\programdata on modern windows, both of storage of user-agnostic program data.

javascript - how to alter a portion of a value of an attribute -

i've got bit of tricky one. i'm trying alter portion of string assigned style. use js change 50% in 2 gradient clauses different values without having create entire string in js. is there sort of regex exchange in conjunction setattribute ? <a class="item" id="bob" style=" background-image:-moz-linear-gradient(0deg, rgb(0, 255, 0) 0%, rgb(250, 250, 5) 50%, rgb(252, 3, 3) 100%); background-image:-webkit-linear-gradient(0deg, rgb(0, 255, 0) 0%, rgb(250, 250, 5) 50%, rgb(252, 3, 3) 100%); filter:progid:dximagetransform.microsoft.gradient(startcolorstr='#00ff00',endcolorstr='#fc0303',gradienttype=1);">mytext</a> argh! var el = document.getelementbyid('bob'); el.setattribute('style', el.getattribute('style').replace('50%', '30%')); but better: var el = document.getelementbyid('bob'); el.style.backgroundimage = el.style.backgroundimage.replace(/50%/g, 

c# - DataTable.ImportRow is not adding rows -

i'm trying make datatable , add couple rows it. here's code: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.data; namespace thisnamespace { class program { static void main(string[] args) { datatable dt=new datatable(); dt.columns.add("xyzid"); datarow dr=dt.newrow(); dr["xyzid"]=123; dt.importrow(dr); dr["xyzid"] = 604303; dt.importrow(dr); } } } when step through program, dr initialized , populated values, after importrow(dr) , count of rows in dt still 0. feel must missing obvious. what's going wrong here? try code: dt.rows.add(dr)

c# - How to set Chrome preferences using Selenium Webdriver .NET binding? -

here i'm using, user agent can set, while download preferences cannot. windows 7, chrome 26, selenium-dotnet-2.31.2, chromedriver_win_26.0.1383.0 chromeoptions chromeoptions = new chromeoptions(); var prefs = new dictionary<string, object> { { "download.default_directory", @"c:\code" }, { "download.prompt_for_download", false } }; chromeoptions.addadditionalcapability("chrome.prefs", prefs); chromeoptions.addargument("--user-agent=" + "some safari agent"); var driver = new chromedriver(chromeoptions); taken chromedriver.log: [1.201][fine]: initializing session capabilities { "browsername": "chrome", "chrome.prefs": { "download.default_directory": "c:\\code", "download.prompt_for_download": false }, "chrome.switches": [ "--user-agent=mozilla/5.0 (windows nt 6.1; wow64) applewebkit/534.57.2

substitution - How to get the substituted text of perl (s//)? -

i use following code substitution. there way retrieve text substituted? in example, want string _5p_outsuffix.txt . /tmp$ ./main.pl xxx_5p_outsuffix.txt /tmp$ cat main.pl #!/usr/bin/env perl use strict; use warnings; $filename="xxx_5p_insuffix.txt"; $insuffix="_((5|3)p)_insuffix\.txt"; $outsuffix = '_$1_outsuffix.txt'; $filename =~ s/$insuffix$/qq{"$outsuffix"}/ee; print "$filename\n"; you should capture match string: $filename =~ s/($insuffix)$/qq{"$outsuffix"}/ee; print "$filename\n"; print "substituted: $1\n"; since introduces level of braces, have adjust numbers of captures used in replacement string. alternatively built-in ${^match} variable contains string matched last successful regex using /p modifier. like $filename =~ s/$insuffix$/qq{"$outsuffix"}/eep; print "$filename\n"; print "substituted: ${^match}\n"; (you shouldn't use $& p

android - How to move from one Activity to another after creating the first instance of them? -

i have mainactivity.java , want open activity a . assuming i'm opening activity a mainactivity , i'll use code : intent = new intent(this,a.class); startactivity(i); when i'm in activity a, , press button. button finish activity a , go mainactivity . if relaunch activity a , relaunched beginning. not want. want single instance created activity a if move a mainactivity many times want , not relaunched, keep last state. when mainactiivty starts another, new activity ,activity pushed on top of stack , takes focus . the previous activity remains in stack, stopped . when activity stops, system retains current state of user interface. when user presses button, current activity popped top of stack (the activity destroyed) , previous activity resumes (the previous state of ui restored) . activities in stack never rearranged, pushed , popped stack—pushed onto stack when started current activity , popped off when user leaves using button. such, stack opera

java - Should I use "this" keyword when I want to refer to instance variables within a method? -

my teacher says when try access instance variable within method should use this keyword, otherwise perform double search. local scope search , instance scope search. example: public class test(){ int cont=0; public void method(){ system.out.println(cont);//should use this.cont instead? } } i hope wrong, can't find argument. no, use this when have name conflict such when method parameter has same name instance field setting. it can used @ other times, many of feel adds unnecessary verbiage code.

c# - Wrappanel in ItemsControl.ItemsPanel throws XamlParseException -

in wp8 app show content (images example). use longlistselector, , in each lls's item have itemscontrol collection of images. want show 2 images in 1 line, use wrappanel. throws xamlparseexception in line initializecomponent() in usercontrol's page. without wrappanel works fine. here code <itemscontrol horizontalalignment="center" itemssource="{binding vkontakte.attachments.photos}" > <itemscontrol.itemspanel> <itemspaneltemplate> <toolkit:wrappanel height="100" width="100" /> </itemspaneltemplate> </itemscontrol.itemspanel> <itemscontrol.itemtemplate> <datatemplate> <image margin="0,10,0,0" > <image.source> <bitmapimage urisource="{binding src}" createoptions="backgroundc

javascript - Can the opacity / translucence of an SVG group be adjusted together? -

Image
i have svg "g" object has several components. i'd render whole thing partly transparent (e.g. alpha = 0.5) i'd to darker if possible. know individual fill colors can adjusted, how of them together, possibly in parameters "g" (grouping) structure. changing opacity of <g> (either opacity="..." attribute, or opacity css rule) cause contents of group first composited , result lowered in opacity. note distinctly different lowering opacity on elements inside group (which can via css): demo: http://jsfiddle.net/hzr7v/12/ uses svg: <svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"> <defs><filter id="darker"> <fecolormatrix type="matrix" values=" 0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.3 0 0 0 0 0 0.8 0"/> </filter></defs> <g id="g1" trans

ruby - Disable jQuery Validate plugin -

i'm completing form using web driver , need bypass 2 form fields using browser.execute_script() insert hidden form field dom. however need disable existing validation methods in order submit form. form uses jquery validate. can advise how disable part or of jquery validate? i tried using following, error typeerror: d undefined b.execute_script(' $("firstmemorablecharacter").rules("remove"); $("secondmemorablecharacter").rules("remove"); ') where firstmemorablecharacter name of form field has attached validation rules. the validation set using jquery validate follows: with($.validator) { addmethod(...); setdefaults({ .... messages: { }, rules: { firstmemorablecharacter: { radiohasvalue: true }, secondmemorablecharacter: { radiohasvalue: true } } }); (the rules shown above ones need disable.) thanks in advan

add row to existing csv file in python -

i want use function add row of information existing csv file. friend_info tuple including [name, address, phone, dob] i have code def add_friend(friend_info, friends_list): open(friends_list, 'a') fapp: writer = csv.writer(fapp) writer.writerow(friend_info) for reason code adding last line of csv (i want start on new line) i don't think csv writer object smart enough know it's appending onto existing csv data. you're giving file object , telling put new csv data file, starts writing can. start new row, need read existing data in first, append new row(s), write out.

android - How to get data from Cursor associated with GridView -

i have gridview , using simplecursoradapter show data database. want data associated current element when clicked item on gridview. how can it? that's adapter code: public class receiptadapter extends simplecursoradapter { private context context; private cursor cursor; private int layout; private map<object,string> receipt_id_cursor_id=new hashmap<object,string>(); //public receiptadapter(context context, arraylist<receipt> receiptvalues) { public receiptadapter(context _context, int _layout, cursor _cursor, string[] _from, int[] _to){ super(_context, _layout, _cursor, _from, _to); cursor = _cursor; layout = _layout; this.context = _context; } @override public view newview(context _context, cursor _cursor, viewgroup parent) { layoutinflater inflater = (layoutinflater) _context.getsystemservice(_context.layout_inflater_service); view view = inflater.inflate(layout, null); return view; } @override public void

c++ - search client's computer for specific files -

what fastest way of searching clients's computer (and other mounted drives) images. clients have desktop app installed in python can add c++ code if faster... if platform win32, c++ can use winapi functions findfirstfile findfirstfileex and then findnextfile as filename can give wildcards known image formats such jpg, jpeg, png, bmp etc. if want speed can run functions on different threads synchronize results. edit: for platform independent solution can use boost::filesystem class or qt's qdir sample code searching files recursively boost::filesystem std::string target_path( "c:\\" ); boost::regex my_filter( "*\.bmp" ); std::vector< std::string > all_matching_files; ( boost::filesystem::recursive_directory_iterator end, dir(target_path); dir != end; ++dir ) { // skip if not file if( !boost::filesystem::is_regular_file( i->status() ) ) continue; boost::smatch what; // skip if no match

Google Maps in Android API v2 shows error -

i trying implement google maps. gets error. my activity package com.alex.googlemaps; import android.os.build; import android.os.bundle; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.mapfragment; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.marker; import com.google.android.gms.maps.model.markeroptions; import android.annotation.targetapi; import android.app.activity; import android.view.menu; @targetapi(build.version_codes.honeycomb) public class mainactivity extends activity { private googlemap mmap; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mmap = ((mapfragment) getfragmentmanager().findfragmentbyid(r.id.map)).getmap(); mmap.setmaptype(googlemap.map_type_satellite); final latlng ciu = new latlng(35.21843892856462, 33.41662287712097); marke

c++ - Building Qt5 with Visual Studio 2012 / Visual Studio 2013, and integrating with the IDE -

how qt5 download , integrate visual studio 2012? of problems encounter, , how solve problems? update re. visual studio 2013 successes reported visual studio 2013 well, , notes being maintained vs 2013. also note the focus of question on building qt visual studio. there notes integrating visual studio ide this method tested work on visual studio 2013. pre-built binaries using visual studio 2012 , 2013 available here , including opengl versions. step 1: setup download , install rapidee here . rapidee windows environment variables editor. extremely useful rest of process (and in general). install directx 11 sdk. part of windows 8 sdk, first have install directx 10 sdk, can here (but see warning in next sentence). if have visual c++ 2010 redistributable package installed, , (it automatically installed along vs 2010), follow steps outlined here assist directx 10 installation. once have directx 10 sdk installed, download , install windows 8 sdk here , contains

javascript - jquery ajax deferred object not returning value -

i have code.. if (!checkifcustomerisvalid(event)) { event.preventdefault(); return false; } else { addcustomer(); } function checkifcustomerisvalid(event) { if ($('#txtcname').val() == '') { alert('please enter valid value customer name!'); return false; } if ($('#txtcaddress').val() == '') { alert('please enter valid value customer address!'); return false; } } it returned fine, until then, added new check , not returning anything. function checkifcustomerisvalid(event) { // code there, name , address check var _mobno; if ($('#txtmobile').val() == '') return false; var _unq = $.ajax({ url: '../autocomplete.asmx/ismobileunique', type: 'get', contenttype: 'application/json; charset=utf8', datatype: 'json', data: "mobileno='" + $('#txtmobil

Reading a text file in C -

i reading text file , trying display contents on console. here code: #include "stdafx.h" #include <stdio.h> #include <string.h> #include <fstream> int main() { file* fp=null; char buff[100]; fp=fopen("myfile.txt","r"); if(fp==null) { printf("couldn't open file!!!\n"); } fseek(fp, 0, seek_end); size_t file_size = ftell(fp); fread(buff,file_size,1,fp); printf("data read [%s]",buff); fclose(fp); return 0; } but redundant data being displayed on console; please point out mistake? you need seek start of file before reading: int main() { file* fp=null; char buff[100]; fp=fopen("myfile.txt","r"); if(fp==null) { printf("couldn't open file!!!\n"); exit(1); // <<< handle fopen failure } fseek(fp, 0, seek_end); size_t file_size = ftell(fp);

java - Popup listView scroll and with imgaes -

i want create popup scroll listview , listview contain images, i tried implement code: button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view arg0) { alertdialog.builder builder = new alertdialog.builder(groupcontext); builder.settitle("group"); builder.setitems(arraynames, new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int item) { toast.maketext(getapplicationcontext(), arraynames[item], toast.length_short).show(); } }); builder.setpositivebutton("ok ", new dialoginterface.onclicklistener() { public void onclick(dialoginterface dialog, int id) { system.out.println("ok clicked"); }

javascript - How can I get this chart to display next to data table in CSS? -

please refer jsfiddle: google chart api example is there obvious css reveals how can chart display right of data table instead of below it? or chart location being controlled javascript? can please provide solution? tried various css methods split chart data table no luck. the chart display in browser couldn't work in jsfiddle. (p.s. javascript in jsfiddle above--it's pretty lengthy...) here's html: <!doctype html> <head> <script type="text/javascript" src="//www.google.com/jsapi"></script> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="js/attc.googlecharts.js"></script> <link rel="stylesheet" type="text/css" href="cs/attcsandbox.css"> </head> <body> <div class="maincontent"> <table class="left" title=&q

dll not found exception Microsoft.SqlServer.BatchParser.dll on Windows 2012, for Sql Server 2012 -

i working on front-end vs2010 c# 4.0, back-end ms sql server 2012. os - windows server 2012. i getting error message. not load file or assembly 'microsoft.sqlserver.batchparser, version=10.0.0.0, culture=neutral, publickeytoken=89845dcd8080cc91' or 1 of dependencies. system cannot find file specified. cause of error because of os 64 bit , batchparser.dll of 32 bit. have find solution sql server 2005 & 2008, when going install upgrade, gives message 'a higher version installed.'. if provided fix not sql 2012, please suggest solution of problem on sql server 2012.

tokenize - How to make string formatting mechanism in Java? -

i'm trying make string formatting mechanism, pretty looks winamp advanced title formatting . i have 'variables' (or metadata fields) bound object properties, in form %varname% . so, example, %title% metadata field bound song title, 'conquest of paradise', %artist% metadata field bound song artist, 'vangelis', , %feat% metadata field bound featuring artists, 'english chamber choir'. now want display song depending on given formatting, example: %title%[ (by %artist%[ featuring %feat%])] square brackets mean don't display unless (all) metadata inside brackets set . nesting of square brackets should possible. abovementioned formatting string says: display metadata field %title% and, if %artist% set (not empty string), display (by %artist%) , if %feat% metadata field non-empty, display field also. in abovementioned example, become: conquest of paradise (by vangelis featuring english chamber choir) now how make such mechanism

javascript - window.confirm take the cancel button out -

how take cancel button window.confirm?? there way taking out , ok button show up? if don't want cancel button, might use alert() : alert('this operation not possible'); in beautiful ascii art looks this: +-----------------------------------+ | | | operation not possible | | | | +--------+ | | | ok | | | +--------+ | +-----------------------------------+ when either ok clicked or dialog dismissed, next statement in code executed. if next statement should conditional, you'd have stick confirm() unfortunately.

wpf - Custom attached command -

i have situation want write custom command framework element. have done below: public class undoredomanager { private static frameworkelement frameworkelement; /// <summary> /// undovmcommand attached properrty. /// </summary> public static readonly dependencyproperty undovmcommandproperty = dependencyproperty.registerattached("undovmcommand", typeof(icommand), typeof(undoredomanager), new frameworkpropertymetadata(undovmcommand, undovmcommand_propertychanged)); /// <summary> /// undovmcommandproperty getter. /// </summary> /// <param name="obj"></param> /// <returns></returns> [attachedpropertybrowsableforchildren] public static icommand getundovmcommand(dependencyobject obj) { return (icommand)obj.getvalue(undovmcommandproperty); } /// <summary> ///

asp.net - Can we select the table data without using select statement -

is possible select data using indexes without using select statement... no , can not, have use anyway. can use stored procedure , call them asp.net stored procedure have select statement data tables.

Sending messages with HTML contents using the MAPI control in VB6 -

how can send mail using mapi html body? need create table in message body. i'm using vb6 , mapi control. ideas? function mailsend(ssendto string, ssubject string, stext string) boolean on error goto errhandler mapisession1 if .sessionid = 0 .downloadmail = false .logonui = true .signon .newsession = true mapimessages1.sessionid = .sessionid end if end mapimessages1 .compose .recipaddress = ssendto .addressresolveui = true .resolvename .msgsubject = ssubject .msgnotetext = stext .send false end mailsend = true exit function errhandler: 'msgbox err.description mailsend = false end function mapi control uses simple mapi, not handle html. there trick when using simple mapi directly (mapisendmail) - set body null , attach , html file: used message body. don't know if trick work mapi control. why

c# - Add JavaScript code to View dynamically -

i have code display google map. in controller, create javascript: mapcode = string.format("<script type='text/javascript'>init_map('my_map', {0}, {1}, 20)</script>", location.location.coordinate.latitude, location.location.coordinate.longitude) but can't write view: @model.mapcode because displays actual javascript - doesn't execute it. is there way this? you pass location.location model , on view: <script type='text/javascript'>init_map('my_map', '@model.coordinate.latitude', '@model.coordinate.longitude', 20)</script> in manner don't have build script controller, not idea.

Fast algorithm to find closed knight's tour -

i'm learning knight's tour algorithm. implemented using rescursive fine take long time , not closed tour. now, i'm finding fast algorithm finding closed tour. can recommend me algorithm? update: have readed somewhere heuristic find closed knight tour this: min[f(x, y)] f(x,y) set of f(x,y)=min(x-1, n-x) + min(y-1, n-y) , (x, y) position of next step , n size of chess board. how use heuristic? the knight's tour problem in fact finding hamiltonian cycle in corresponding graph, known np-hard, problem may hard solve. however, there several heuristics allow perform fast lookup. 1 of such heuristics warnsdorff's rule: on each step move square, less possible moves available. if there several such squares, move 1 of them. it's heuristics, , long time has been considered in fact solution knight's path problem, , examples showing second part of rule may lead incorrect decision found later computer usage.

android - How to interrupt GLSurfaceView rendering phase and start a new one? -

hi android developers, what best way interrupt current rendering phase of glsurfaceview , start new 1 when mode equal "render_when_dirty"? artificially stop rendering in "ondraw" method checking flag , returning actual rendering method called in "ondraw" method; then, in main thread's context call "requestrender()" refresh scene. however, due reason not aware of, of intermediary old frames displayed very short period of time(on other hand, endure long period of time users can realize transition); before actual scene rendered opengl es 2.x engine. doesn't affect @ all; troublesome fixed. suggest? p.s. throwing interruptedexception within ondraw method useless due destruction of actual rendering thread of glsurfaveview. kind regards. when of old frames drawn - mean part of frame drawn old or multiple calls of ondraw() still lead of old information being shown on display. there few things can see happening here. if hav

pentaho - How I manage the sample datasource in Saiku -

i installed saiku plugin in pentaho 4.8. saiku comes sample data steelwheels. user able choose "select cube" in dropdown box. need know how can modify data in sample data? file contains datastore? , how database communicate xml file? thank you you have create cube in pentaho schema workbench or in pentaho bi server.. if creating in schema workbench have publish after publish schema bi server directly able see selected cube saiku server..

java - SWT statusText change when mouse no longer hovering over link -

i creating web browser swt , having trouble status text listener. updates when mouse hovers on link not update when mouse no longer on link. i tried calling "updatelisteners" within mousemoved listener statustext listener implemented typed listener , don't believe can updated since there no swt.statustext constant. don't believe have worked anyway, since internally status text updated when mouse left link change , call own changed function. any suggestions? prefer not use javascript (but if necessary), , running swt source should need changed internally. thanks help!

apache - How do I create the project outside the /var/www/ directory? -

i've ubuntu server static ip testing purpose, i'd create project (for example hello-world) outside /var/www/ directory, let's in location(/home/username/webroot/hello-world/). should accessible via browser http://xxx.xxx.xxx.xxx/hello-world/ how do this? i use alias: alias /hello-world /home/www/foo <directory "/home/www/foo"> options -multiviews -followsymlinks +symlinksifownermatch allowoverride </directory>

html - Dynamic Background around a header with background -

i got pretty serious problem. i have header background, has different ends left , right. header, content wrapper around them 1065px wide. i created "background_wrapper" holds graphic continues on header graphic. features different ends left , right , empty space, wide header graphic. has stay right @ end of header graphic, when browser window 100% wide (on pc screen). however, if resize it, gets smaller , smaller (everytime on 100%), moves behind header. i uploaded here: http://bf3zone.bplaced.net/coding/ my code it: <body> <div id="background_addition"> <div id="wrapper" class="clearfix"> <div id="header"> <div id="logo"> <a href="index.html" title="m3 institut - zurück zum start"> <img src="images/logo_hover.png" alt="m3 institut - menschen machen märkte" class="b" />

xslt - How to pass XSL variable in to a Javascript function? -

below sample xsl file <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:template match="/"> <html> <head> <script type="text/javascript"> //<![cdata[ function showhide(elementid){ if (document.getelementbyid(elementid).style.display == 'none'){ document.getelementbyid(elementid).style.display = ''; } else { document.getelementbyid(elementid).style.display = 'none'; } } //]]></script> <!-- inserting pie chart --> <script type="text/javascript" src="https:/

c - loop tiling/blocking for large dense matrix multiplication -

i wondering if show me how use loop tiling/loop blocking large dense matrix multiplication effectively. doing c = ab 1000x1000 matrices. have followed example on wikipedia loop tiling worse results using tiling without. http://en.wikipedia.org/wiki/loop_tiling http://software.intel.com/en-us/articles/how-to-use-loop-blocking-to-optimize-memory-use-on-32-bit-intel-architecture i have provided code below. naive method slow due cache misses. transpose method creates transpose of b in buffer. method gives fastest result (matrix multiplication goes o(n^3) , transpose o(n^2) doing transpose @ least 1000x faster). wiki method without blocking fast , not need buffer. blocking method slower. problem blocking has update block several times. challenge threading/openmp because can cause race conditions if 1 not careful. i should point out using avx modification of transpose method results faster eigen. however, results sse bit slower eigen think use caching better. edit: