Posts

Showing posts from March, 2011

ssrs 2008 - SQL Server Reporting Service - Service Manager Error - User Does not have required permission -

i have fresh install ssrs 2008 r2 on win2k8 box ( on administrator). after install, when run reports manager, gives following error user 'win2008\tellink' not have required permissions. verify sufficient permissions have been granted , windows user account control (uac) restrictions have been addressed. i not find answer on web resolve problem. can please this? i found answer. , here solution - since using non built in administrator account access report manager, gettnig error. log off 'win2008\tellink' , log in administrator account acess reports manager. able access it. after have added 'win2008\tellink' usr usr role.

ruby on rails - Receiving this odd error with Vagrant, wondering if someone could lend a hand -

i trying set vagrant. following guide on web site , have trouble provisioning part of guide (http://vagrantup.com/docs/getting-started/provisioning.html) have followed thing on site receiving error, on mac osx if it's of important evan@superduper ~/vagrant_guide $ vagrant there problem configuration of vagrant. error message(s) printed below: chef: * run list must not empty. here code vagrant file if helps: vagrant::config.run |config| config.vm.box = "lucid32" # enable chef solo provisioner config.vm.provisioner = :chef_solo # grab cookbooks vagrant files config.chef.recipe_url = "http://files.vagrantup.com/getting_started/cookbooks.tar.gz" end does , how can fix it? thanks j you need add line vagrantfile: config.chef.add_recipe("vagrant_main")

python paramiko -

have installed paramiko python , pycrypto windows 7 machine. import paramiko ssh = paramiko.sshclient() tried above commands keep getting error msg: attributeerror: 'module' object has no attribute 'sshclient' but error message goes away if key in above commands 1 line @ time. any help? by chance have called file paramiko.py ? you'll need name else avoid getting error.

java - Why an InputStream obj cannot be nested into a BufferedReader obj directly? -

an outputstream obj can connected printwriter obj directly, e.g., //either ok new printwriter(socket.getoutputstream()); new printwriter(new outputstreamwriter(socket.getoutputstream())); in case of inputstream obj, must connected bufferedreader obj through inputstreamreader obj, is, new bufferedreader(new inputstreamreader(socket.getinputstream())); //ok new bufferedreader(socket.getinputstream()); //doesnt work there reason inconsistency of api design? java introduced reader , writer hierarchy (java 1.1 think) when input , output stream classes in use. therefore using bridge pattern allow have stream classes passed reader classes. further writer pritnerwriter directly bridge class equivalent inputstreamreader. see same thing bufferedwriter more info read http://www.codeguru.com/java/tij/tij0114.shtml

Easiest way to give Javascript alert after PHP header() redirect -

i have page users submit form, , goes separate php script. after script done, header() redirects user page on. want if there error or conditions in script, redirect user same page display javascript alert once there warning message. append variables url , check $_get figure there easier way... perhaps post data, or that? thanks if error encountered, store error state $_session array , redirect browser original page. have script on original page check if error state set. if yes, trigger javascript alert or whatever handling want have. and @ common footer template (or @ footer of original page), check , clear errors array, doesn't persist when user moves other pages or reloads current page. example: processor.php <?php if($something == $iswrong){ $_session['errors']['error5301'] = 1; session_write_close(); header("location: http://www.example.com/originalpage.php"); exit; } ?> originalpage.php <!-- header --...

java - Converting from Integer, to BigInteger -

i wondering if there way convert variable of type integer, biginteger. tried typecasting integer variable, error says inconvertible type. the method want biginteger#valueof(long val) . e.g., biginteger bi = biginteger.valueof(myinteger.intvalue()); making string first unnecessary , undesired.

sql - Replace String in Oracle Procedure -

i have problem oracle procedure,since i'm new in sql language :d, here query create or replace procedure mondesint.updatecoadescription descript mondes_mstr_chart_of_account.nama_akun%type; begin satu in (select no_akun, nama_akun mondes_mstr_chart_of_account no_akun '4-1-200-2-03-000%') loop select replace(nama_akun,substr(nama_akun,0,33),'utang-dana deposit-usd') descript mondes_mstr_chart_of_account no_akun = '4-1-200-2-03-0009'; update mondes_mstr_chart_of_account set nama_akun = descript no_akun = '4-1-200-2-03-0009'; end loop; end updatecoadescription; in case, replace string in column on table. column name "nama_akun", replace nama_akun no_akun '4-1-200-2-03-000%'. in code above, try 1 record no_akun = '4-1-200-2-03-0009'. select replace(nama_akun,substr(nama_akun,0,33),'utang-dana deposit-us...

asp.net mvc - Viemodel with stored Procedure -

i following tutorial of scott gu here retrieve data using stored procedure. setting return type of stored procedure dropping sproc on class. question can set viewmodel return type of stored procedure, view typed viewmodel you can associate return type of stored procedure custom type: in .edmx design click on imported stored procedure , set function import name somecustomname , select return type -> entities -> someentity. having stored procedure return entity models map models view model returned view. considered practice have view models tailored views instead of passing directly sql transport objects.

java - store state/expanded nodes of a jtree for restoring state -

i working jtree. i know best way know nodes expanded in jtree save state (i.e. save expanded paths). if call model.reload() jtree not stay collapsed, able restore original state user, i.e., expanded nodes expanded. santhosh kumar 1 of go-to guys swing hacks. answer: http://www.javalobby.org/java/forums/t19857.html

Accessing Microphone in Android SDK -

is there way access micro phone in android phones similar accessing android.hardware.camera ?. know can use mediarecorder record audio android application file shown in link . let me explain want do. i'm accessing camera android program capture video , each captured frame using camera.preview callback function. after decoding frame i'll upload streaming server (haven't tried practically yet :) ) these frames contain image information how can audio along frames? can 1 suggest me technique implementing above idea? yes here is http://developer.android.com/reference/android/media/audiorecord.html

Javascript closing tag is echoed twice from php -

<?php echo "<script type = 'text/javascript'></script>"; ?> output's page source shows : <script type = 'text/javascript'></script></script> why putting closing tag ?? , putting there ?? browser ? server ? ? perhaps it's browser's dom parser putting ending tag in. have checked code above see if have unterminated <script> tags?

javascript - jQuery UI drag/drop sorting comparision using float:left vs display:inline-block -

i have 2 examples here, difference between these 2 example 1 uses display:inline-block , other 1 uses float:left, li.doc_item{display:inline-block;} vs li.doc_item{float:left;} my problem display:inline-block sorting not fast or responsive float:left. want use display:inline-block because thumbnails re-ordering can vary in size , float:left doesn't work when thumbnails have different height , width. any question how make block:inline-block fast float:left ? you can find comparative example here: http://dev-server-2.com/drag-drop-sample/ i came across same issue, , figured should find out what's causing it. it's because treat floated elements differently, , differentiation should made on inline-block well. try patch: jquery.ui.sortable.prototype._create = function() { var o = this.options; this.containercache = {}; this.element.addclass("ui-sortable"); //get items this.refresh(); //let's determine if items...

android - parsing the Json Data -

here posting json response below: {"resultset": {"result":[ {"phone":"(650) 473-9999", "distance":"2.59", "mapurl":"http://maps.yahoo.com/maps_result?q1=441+emerson+st+palo+alto+cagid1=28734629", "categories": {"category":[ {"content":"salad restaurants", "id":"96926225"}, {"content":"vegetarian restaurants", "id":"96926239"}, {"content":"pizza", "id":"96926243"}, {"content":"wine", "id":"96926864"}, {"content":"alcoholic beverages", "id":"96929810"}]}, "city...

How to make dynamic color grid with java -

i want make java program create dynamic color grids. want make 10 grids, color grid spaced. , 30, closely spaced. here image : http://i.stack.imgur.com/d2yba.png and every grid should responsible making event. oh yes, there range of color. 10 t0 100. i first tried random function. know rgb color range 0 255. tried make random color, 1 color can come again , mess whole things. want unique color grids no repetition. want image. can me on these! you might begin looking @ jcolorchooser , discussed in how use color choosers . 1 easy way produce spectral series of colors uses hsb model; choose hues in range 0 315 constant saturation , brightness. question isn't specific events, here's example of displaying information mouse moves on each color.

gwt - How to populate combobox using database -

i want put items in gwt combobox using database. please provide me suggestion item of gwt-combobox using database. well, question doesn't have detail, it's hard know information you're seeking. that said, you're going want create gwt service method getcomboboxdata(). (alternatively, if have gwt service, can add new method it.) in implementation of method (that is, on server side) query database information want put in combo box. information should them returned getcomboboxdata() method. then, in onsuccess() method of callback used when calling getcomboboxdata(), take data out of onsuccess() method parameter, contain data returned in getcomboboxdata(), , add combobox additem() method. btw, gwt class want use combo box listbox. i highly recommend read documentation gwt provides, can find here . luck.

.net - Convert XSL working draft to current version -

i'm converting old website uses clientside xslt based on old working draft: <xsl:stylesheet xmlns:xsl="http://www.w3.org/tr/wd-xsl"> it looks ie browser can manage transform html client side. when transforming done serverside .net code, throw error: system.xml.xsl.xslloadexception occurred message="the 'http://www.w3.org/tr/wd-xsl' namespace no longer supported." is there easy way convert stylesheets (a lot of them) automatically? regards, michel sadly not. microsoft have tool claims it, trivial bits, rather context(-3) stuff trip up. way hand. if download msxsl.exe (the command line utility) microsoft can transform on desktop long force msxsl 3.0 so: msxsl -u 3.0 <data file> <xsl file> maybe can call net app if simple, otherwise have covert manually.

Stop php script execution -

i have php_mod , apache server. if start script browser persist until execution complete ( if close browser ) how can stop process ? normally, if you're sending output, doesn't happen: if webserver detects disconnect, php process stoppend (which why have functions register_shutdown_function make sure done (unelss encounter fatal error of course)). however, http stateless, point in time webserver detect disconnect when trying send content (see remarks @ ignore_user_abort (default false, want)). depending on context of request, workable kludge in big loops send non-displayed data user, in html send whitespace , flush . can end in buffer though, (php's, servers, other places in network) detection still not 100%, unavoidable. sane time limit avoid infinite looping, , upping limit requests need them best can do.

objective c - is it true no italics for iPhone 4? -

in project, iphone 4 not show italics command textlabel.font=[uifont italicsystemfontofsize:16]; but iphone 3 shows italics properly. is true iphone 4 not support italics? if not using systemfont, can italics? thanks, gary sadly yes, not seem work iphone 4. blogged @ daring fireball , picked here . if you, best thing wait out. apple fix issue during future ios update.

Is it possible to pass parameters to a Perl module loading? -

i developping multi-environment perl script. know, environment configuration juggling quite pain if badly done. perl script must allow command line parameters in configuration value overload purpose, came following solution : package cfg; use strict; use warnings; $genvironment = "debug";#"production"; %gconfig = ( debug=>{message=>"this dbg env.",url=>"www.my-dbg-url.org"}, production=>{message=>"this prod env.",url=>"www.shinyprodurl.org"} ); $gmessage = defined $gconfig{$genvironment} ? $gconfig{$genvironment}{message} : die "crappy environment"; sub message { $gmessage = shift(@_) if (@_); $gmessage } sub url { defined $gconfig{$genvironment} ? $gconfig{$genvironment}{url} : die "crappy environment" } 1; so, following script : use strict; use warnings; use cfg; print cfg::message,"\n"; cfg::message("i'm surcharged message."); print cfg::mes...

Anonymous Structures in C found in Unix Kernel -

i have started reading lions commentary on unix v6. came across these snippets, have never seen used in c language. author provide sort of explanation, explain me happening here? params.h : sw 0177570 ...... struct { int integ; }; and used in unix/prf.c if(sw->integ == 0) explanation author sw defined value 0177570. kernel address of read processor register stores setting of console switch register. meaning of statement clear: contents @ location 0177570 , see if zero. problem express in c. code if (sw == 0) not have conveyed meaning. sw pointer value should dereferenced. compiler might have been changed accept if (sw-> == 0) stands, syntactically incorrect. inventing dummy structure, element integ , programmer has found satisfactory solution problem. my question how work? when compiler sees sw->integ , how associate sw anonymous structure? iirc, ancient c compilers kept field names (such integ ) in single name...

java - example of spring declarative roolback-for? -

want declarative transactional management example in spring aop........ actually here <aop:config> <aop:advisor advice-ref="addadvice" pointcut="execution(* com.dao.*.*(..))"/> </aop:config> <tx:advice id="addadvice" transaction-manager="transactionmanager"> <tx:attributes> <tx:method name="add*" propagation="required" rollback-for="" /> </tx:attributes> </tx:advice> so here want write rollback-for="" , there method or else? , if method method put? in rollback-for specify name of exception. example if you want rollback your.pkg.noproductinstockexception , write rollback-for="your.pkg.noproductinstockexception" this make transaction rolled if encounters exception matches specified. if exception thrown not match, propagated caller of service or wrapped transactionrolledbackexception the tr...

PHP submit form button question -

possible duplicate: how handle multiple submissions server-side how can stop submit form button being pressed multiple times resulting in sending data multiple times using php. with javascript. make use of onclick event this: <input type="submit" onclick="this.disabled=true;" />

Four binaries out of Visual Studio/C# compilation -

i compiled simple program (hir) in visual studio 10.0 (c#), , got 4 binaries in debug/release directory. hir.exe hir.pdb hir.vshost.exe hir.vshost.exe.manifest i guess hir.exe binary, , hir.pdb debugging info. however, hir.vshost.exe , hir.vshost.exe.mainfest for? in terms of deployment, have let users install 4 files? you don't need deploy 'vshost' files, these performance of debugging in visual studio. just confirm, msdn hosting process files (.vshost.exe) use visual studio , should not run directly or deployed application http://msdn.microsoft.com/en-us/library/ms185331%28v=vs.100%29.aspx

asp.net - Forcing .net Login control to make the user logout if a cookie is null -

i have code base web application connected 2 databases. depending on login control user uses login, different database connected code. doing of cookie. cookie in public class called authenticateduser. class looks this: public class authenticateduser : system.web.ui.page { public static string connectionstring { { httpcookie mycookie = httpcontext.current.request.cookies["connectionstring"]; return getconnectionstringfromname(mycookie); } set { if (httpcontext.current.request.cookies["connectionstring"] != null) { expirecookies(httpcontext.current); } var allcookies = httpcontext.current.request.cookies.allkeys; httpcookie cookie = new httpcookie("connectionstring"); cookie.value = value; cookie.expires = datetime.now.addyears(100); httpcontext.current.response.cooki...

How can I make Rack::Session::Pool work in a test using Sinatra and RSpec? -

how can make sessions work in rspec tests? i have tried this: describe "createnewlist_route_spec" include rack::test::methods use rack::session::pool def app @app ||= sinatra::application end "should save listitem database" post '/addnewlistitem', {:item => 'testitem'}, :sessions => {:userid => '123'} end end i'm noob sinatra, might on wrong track here... this solved problem: http://gist.github.com/375973 not quite wanted, works in tests.

javascript - How do I ensure that Google Analytics is loaded before calling it's functions? -

after reading blog post, got idea add safety code ensure google analytics objects loaded before calling it's functions. typicle google analytics code goes like: var pagetracker = _gat._gettracker("x-uaxxxxx"); pagetracker._trackpageview(); and pagetracker._additem( bla bla ); pagetracker._tracktrans(); i have thought of 2 options double ensure _gat-object loaded before use: 1) use jquery.ready call _get-functions. like: $(document).ready(function() { var pagetracker = _gat._gettracker("x-uaxxxxx"); pagetracker._trackpageview(); } or 2) use javascript timeout function checkgat() { if( gat_is_ready ) { var pagetracker = _gat._gettracker("x-uaxxxxx"); pagetracker._trackpageview(); } else { settimeout('checkgat()', 1000); } } checkgat() what better solution? why? , additional comments? this unnecessary. use new google analytics asynchronous code ; you. <script ty...

wpf - Binding GradientStop works but reports error -

the following code binds gradientstop background.color property of templatedparent . works getting binding error in output window: system.windows.data error: 2 : cannot find governing frameworkelement or frameworkcontentelement target element. bindingexpression:path=background.color; dataitem=null; target element 'gradientstop' (hashcode=6944299); target property 'color' (type 'color') <window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:class="wpfbindingtest.mainwindow" x:name="window" title="mainwindow" width="100" height="100"> <window.resources> <controltemplate x:key="gradienttemplate" targettype="{x:type contentcontrol}"> <border borderthickness="1" borderbrush="{templatebinding background}"> <border.backgr...

sql - Table Design For Multiple Different Products On One Order -

if have online shopping website sold apples , monitors , these stored in different tables because distinguishing property of apples colour , of monitors resolution how add these both invoice table whilst still retaining referential integrity , not unioning these tables? invoices(invoiceid) | invoiceitems(itemid, productid) | products(productid) | | apples(appleid, productid, colour) monitors(monitorid, productid, resolution) in first place, store them in single products table, not in 2 different tables. in second place, (unless each invoice 1 product) not add them single invoice table - instead, set invoice_products table, link between tables. i suggest database normalisation .

Using Python code coverage tool for understanding and pruning back source code of a large library -

my project targets low-cost , low-resource embedded device. dependent on relatively large , sprawling python code base, of use of apis quite specific. i keen prune code of library bare minimum, executing test suite within coverage tools ned batchelder's coverage or figleaf , scripting removal of unused code within various modules/files. not understanding libraries' internals, make writing patches easier. ned refers use of coverage tools "reverse engineer" complex code in 1 of online talks. my question community whether people have experience of using coverage tools in way wouldn't mind sharing? pitfalls if any? coverage tool choice? or better off investing time figleaf ? the end-game able automatically generate new source tree library, based on original tree, including code actually used when run nosetests . if has developed tool similar job python applications , libraries, terrific baseline start development. hopefully description makes sense r...

asp.net - Possible to turn off App_Code auto-compile? -

working visual studio (i'm using 2008) have started notice when save file in /app_code folder, program hang bit before returning control. after bit of research, have learned there's auto-compile feature @ work, assume slowing down system. so question this: possible turn off automatic compiling of files in /app_code folder? or, better, there way reduce time takes, or make work little more smoothly in background? thoughts/ideas appreciated! sorry don't know of way of switching off compiling app_code folder. if issue try keep amount of files in directory down min or move them out seperate library. scottgu has tips might find useful. http://weblogs.asp.net/scottgu/archive/2006/09/22/tip_2f00_trick_3a00_-optimizing-asp.net-2.0-web-project-build-performance-with-vs-2005.aspx

sql server - Need help for SQL select query for this two table -

table capture image : http://img844.imageshack.us/img844/6213/99730337.jpg ------------ positiontable------------ id contentfk position 11 100 1 12 101 1 13 104 2 14 102 2 15 103 2 16 105 3 17 106 3 18 107 2 ----------content table ------------ contentid updatedate title 100 11.10.2009 aol 101 12.10.2009 microsoft 102 12.10.2009 e-bay 103 12.11.2009 google 104 16.11.2009 novell 105 17.11.2009 asus 106 16.11.2009 nokia 107 11.11.2009 samsung who can me question between 2 tables scenario. sort number position 1,2,3. however, number of groups list 1 record (order position asc (position: 1,2,3) with positiontable.contentfk = contenttable.contentid updatedate of last update in contenttablo how can list same result. p.postion ...

actionscript 3 - Changing font size in Flex app -

how can change font size in flex application? write style like <mx:style> global { fontsize: 20; } </mx:style> in main application. should inherited application contents.

repository - Need presentation materials for convincing a customer to use Maven -

my customer needs more organized inventory of 3rd-party libraries (such jar files) used in production projects. involved number of java-based projects. inventory has not been consistently maintained in past , time has come account libraries being used (there quite few!) , enforce structured process introducing new libraries build environment. i have tried pitching idea of using maven , artifactory in build process leverage tools' ability manage repository of binary libraries , handle transitive library dependencies. customer resistent suggestion because think create more work them maintain artifactory server , learn basics of maven. currently, java projects built using ant scripts. transitive dependencies largely managed trial-and-error. inventory of libraries in use maintained hand , binaries stored in subversion repository. customer recognizes needs improved, current suggestions improvement involve more ad-hoc "manage hand" approaches. i want convince custo...

c# - Verify that a base protected method is called with Moq 3.1 -

i have class inherits abstract base class. trying verify specified protected method in base class called twice , i'd verify parameters passed specific values (different each call). i hoping i'd able use protected either expect or verify , seemingly i've missed can done these methods. is i'm attempting possible moq? update: example of i'm trying do: class mybase { protected void somemethodthatsapainforunittesting(string var1, string var2) { //stuf file systems etc that's hard unit test } } class classiwanttotest : mybase { public void iwanttotestthismethod() { var var1 = //some logic build var 1 var var2 = //some logic build var 2 somemethodthatsapainforunittesting(var1, var); } } essentially want test way variables var1 , var2 created correctly , passed somemethodthatsapainforunittesting , want mock out protected method, verify called @ least once , parameters passed correctly. if calling ...

php - file_get_contents() returns garbled data -

i trying use api (eg: http://api.stackoverflow.com/1.0/users/3 ) data: <?php $data = file_get_contents('http://api.stackoverflow.com/1.0/users/3'); echo $data; ?> but returned contents garbled. tested on couple different servers, including http://codepad.viper-7.com/9gfvsm . code or api? the response gzipped. recommend use curl , set curlopt_encoding gzip.

php - Excluding all characters NOT in list AND NOT in a list of phrases -

i'm attempting make function in php evaluate mathematical expression -- including functions such sin, cos, etc. approach delete characters in phrase not numbers, mathematical operators, or mathematical functions , use string in eval(). problem don't know enough regular expressions negate both characters , phrases in same expression. so far, i've got: $input = preg_replace("/[^0-9+\-.*\/()sincota]/", "", $input); obviously, characters sin, cos, , tan can used in order in input expression (rather only allowing phrases sin, cos, , tan). if further expand function include more characters , functions, presents bigger security risk malicious user able execute php command through clever interaction app. can tell me how fix regex , eliminate problem? i'm attempting make function in php evaluate mathematical expression -- including functions such sin, cos, etc might suggest taking advantage of years of work has been put ph...

Excel VBA or Function to extract Workbook name and data from workbook -

is there way extract workbook name, extract part of it. version of excel fine preferably 2003. for example "help_ticketid123456788.xls" "help_ticketid563565464.xls" ... so i'd extract id numbers , put them column on master worksheet in workbook. additionally i'd extract data specific columns (always same columns) each workbook, , put master worksheet too. thank you!! in master spreadsheet can write vba procedure loop on xls files in directory, extract id number each filename, , open each file extract other data. should started: sub runcodeonallxlsfiles() dim lcount long dim wbresults workbook dim wbcodebook workbook application.screenupdating = false application.displayalerts = false application.enableevents = false on error resume next set wbcodebook = thisworkbook application.filesearch .newsearch 'change path suit .lookin = "c:\mydocuments\testresults" .filetype = msofile...

syntax - combining strings using string substitution - python -

hey guys, want perform following operation: b = 'random' c = 'stuff' = '%s' + '%s' %(b, c) but following error: typeerror: not arguments converted during string formatting does 1 of know ? depending on want : >>> b = 'random' >>> c = 'stuff' >>> = '%s' %b + '%s' % c >>> 'randomstuff' >>> >>> b + c 'randomstuff' >>> >>> z = '%s + %s' % (b, c) >>> z 'random + stuff' >>>

php - Auto redirect / download if image doesn't exist - optimisation -

i have lot of images on website, pulled image server onto main server when requested save disk space @ hosting server. to achieve have entry in .htaccess file internally redirects people /images/image.jpg download.php checks see if file exists. if file exists serves (code below) else it'll use curl pull in remote file redirect header("location: ".$_server['request_uri']); shows image. is inefficient serve images browser in such manner? faster let web server naturally? code reading , showing file below. $file_extension = strtolower(substr(strrchr($filename,"."),1)); header("pragma: public"); header("content-type: image/jpg"); header("content-length: ".filesize($filename)); header("content-transfer-encoding: binary"); header("content-length: ".filesize($filename)); readfile("$filename"); would better off (read: more efficient) not using htaccess redirect modifying 404 page check...

What is the best way to create an Excel file with ColdFusion? -

i want create excel file coldfusion. until now, saving html , changing file extension. however, need create real excel file. any advice? thanks got coldfusion 9? baked in cfspreadhseet tag (and related functions).

osx - Changing Cocoa display name in the app? -

how change name shows above app in dock on os x? (i've tried renaming target , renaming project. and, i've googled it.) after further googling, i've found this: "project" -> "edit active target" -> "packaging" -> "product name" (it didn't work first time tried though... odd.)

html - My text loses its 'bold' when I change its font-size property -

i have text on website make 'bold', , font-size 'x-small'. whenever apply font-size, text loses bold. when remove font-size, , text goes default, it's bold again. what's going on here? <span style="font-size:x-small; font-weight:bold;">testing</span have tried other font families? if remember correctly, arial in small sizes looks same in bold , normal weights. give verdana shot.

MySQL Display Table Name Along With Columns -

i'm debugging huge mysql call joins large amount of tables share column names such id, created_at, etc. started picking apart wondering if there way like: select * table.column_name table1 left join etc etc etc... in place of having individually name columns like: select table1.`column2' 'name', table1.`column3` ... it speeding debugging process if there's way it. thanks. edit: thanks answers far. they're not quite i'm looking , think question bit vague i'll give example: suppose have setup in mysql schema: table: students fields: int id | int school_id | varchar name table: schools fields: int id | int name students contains: 1 | 1 | "john doe" schools contains: 1 | "imaginary school one" doing mysql call "select * students left join schools on (students.school_id = schools.id)" yield: id | school_id | name | id | name 1 | 1 | "john doe" | 1 | "imaginary...

python - Can You Use a Single Regular Expression to Parse Function Parameters? -

problem there program file contains following code snippet @ point in file. ... food($apples$ , $oranges$ , $pears$ , $tomato$){ ... } ... this function may contain number of parameters must strings separated commas. parameter strings lowercase words. i want able parse out each of parameters using regular expression. example resulting list in python follows: ["apples", "oranges", "pears", "tomato"] attempted solution using python re module, able achieve breaking problem 2 parts. find function in code , extract list of parameters. plist = re.search(r'food\((.*)\)', programstring).group(1) split list using regular expression. params = re.findall(r'[a-z]+', plist) question is there anyway achieve 1 regular expression instead of two? edit thanks tim pietzcker's answer able find related questions: python regular expressions - how capture multiple groups wildcard expression? which regex fla...

javascript - AJax JSON Call error when trying to access the properties of class -

i making json call web method defined in code behind. web method returns class object.the class returns 3 properties 1 of type list , 2 integers. accessing these in following manner: success: function(result) { alert(result); alert(result.lookcount); alert(result.length); if(result.lookcount > 0) { var info = ""; for(var = 0;i < result.lookups.length; i++) { info += createlookupgrid(result.lookups[i].client,result.lookups[i].clientorg); } alert(result.lookcount) -> alerts undefined , when alert result shows me compelte result string has data. data returned correctly web method. unable access it. you need convert result string object. if you're using latest version of jquery, can use parsejson method: var data= $.parsejson...

Remove from one side of the many to many in Nhibernate -

i have these 2 objects in nhibernate forming many many relationship: user: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="providers" namespace="providers.objects"> <class name="user" table="users"> <id name="userid" type="int"> <generator class="native" /> </id> <many-to-one name="application" column="applicationid" cascade="none" /> <property name="username" type="string" /> <property name="loweredusername" type="string" /> <property name="mobilealias" type="string" /> <property name="isanonymous" type="bool" /> <property name="lastactivitydate" type="datetime" ...

iphone - Infinite UIScrollView for whiteboard-like app -

naturally "infinite" uiscrollview question has been asked before, seem related sort of scenario: a scrollview 4 card subviews on "carousel", i.e. reaching 4th card , swiping in direction of continuation yield 1st card again (and therefore no need scroll backwards). what want folks @ popplet.com implemented on ipad app, scroll in direction (which unlimited/infinite) canvas resizes allowing practically infinite widget placement. i know involves sort of kvo observing i'm bit lost. general idea have main contentview placed within scrollview , other views placed inside (those ones can dragged, etc.) without downloading app , having @ might able use delegate call - (void)scrollviewdidscroll:(uiscrollview *)scrollview; and when scrollview close end increase contentsize property of scrollview. when gets called user scrolls possible check if drawn there , decrease necessary. use contentoffset property of scrollview check user in scrollview. just ...

iis 6 - How do I assign limited console program access to IIS 6? -

let's have simple console program fetch list of files given folder name. want call console program using php code on site running on unique windows user account (ie not default web user account). there way can allow windows account access console program without giving blanket access cmd.exe? i'm working iis 6 on windows 2003 server. update: here's code i've tried using popen() $reg_cmd = '"c:\windows\system32\notepad.exe"' ; $error = ''; $handle = popen($reg_cmd, 'r'); if (!$handle){ $last_error = error_get_last(); $error = $last_error['message']; } else{ while (!feof($handle)) { $result .= fread($handle, 2096); } } pclose($handle); $error ends containing either: popen("c:\windows\system32\notepad.exe",r) [function.popen]: result large or popen("c:\windows\system32\notepad.exe",r) [function.popen]: no such file or directory i've no idea why error message incon...

Cassandra nodetool: Connection refused to host: 172.24.0.10 -

when using cassandra's nodetool see ring of remote host (use ip address), gives following error, how make work? btw - can ping host using ip address. root@servera:~/cassandra# bin/nodetool -h 172.24.0.10 ring error connecting remote jmx agent! java.rmi.connectexception: connection refused host: 127.0.1.1; nested exception is: java.net.connectexception: connection refused @ sun.rmi.transport.tcp.tcpendpoint.newsocket(tcpendpoint.java:619) @ sun.rmi.transport.tcp.tcpchannel.createconnection(tcpchannel.java:216) @ sun.rmi.transport.tcp.tcpchannel.newconnection(tcpchannel.java:202) @ sun.rmi.server.unicastref.invoke(unicastref.java:128) @ javax.management.remote.rmi.rmiserverimpl_stub.newclient(unknown source) @ javax.management.remote.rmi.rmiconnector.getconnection(rmiconnector.java:2343) @ javax.management.remote.rmi.rmiconnector.connect(rmiconnector.java:296) @ javax.management.remote.jmxconnectorfactory....

class - I'm having a hard time understanding Java objects and classes -

example 1 /** *program name: cis36l0411.java *discussion: class -- data members * method members */ class cis36l0411 { public static void main( string[] args ) { dataonly data1 = new dataonly(); system.out.println( "dataonly\tlimit\t\t" + data1.limit ); system.out.println( "\t\tintmem\t\t" + data1.imem ); system.out.println( "\t\tdoublemem\t" + data1.dmem ); methodonly method1 = new methodonly(); method1.printfunc( 5 ); method1.printfunc( "methodonly object!" ); method1.printfunc( data1.limit ); return; } } class dataonly { final int limit = 100; //constant , package mode or access int imem; //package mode or access double dmem; //package mode or access } class methodonly { void printfunc( int ia ) //package mode or access { system.out.println( "the int value " + ia ); return; } public void print...

c# - Stuck trying to create an async method -

for last week i've been trying create async method. tried msdn article how to: implement component supports event-based asynchronous pattern work in method in same class. work i'm doing lot more complicated , own class. problem i'm having class doing work cannot post progress or completion methods handle stuff in parent class. does have suggestions on how fix this? thanks answers chaps - simple (and stupid) mistake - made event shared in parent class , bob's uncle!

types - Java- Identifying ints and doubles -

i want write conditional statement, depending on whether variable int or double, i.e if (x double) stuff else if(x int) stuff else stuff i know might not idea, choice now. possible? i have no idea how x int or double without knowing @ compile time, but void dostuff(int x) { stuff... } void dostuff(double x) { stuff... } then dostuff(x) will call appropriate method.

python: append only specific elements from a list -

i have list of list: b=[[1,2,3],[4,5,6],[7,8,9]] i have list: row = [1,2,3] how append b row[0] , '3847' , row[2] such b equal: b=[[1,2,3],[4,5,6],[7,8,9],[1,3847,3]] you're going have more specific. this accomplish want: b.append([row[0], 3847, row[2]]) but isn't general solution.

jquery - How do I remove the parent element? -

i'm brand new jquery , not sure if i'm referring correctly "parent" element. want remove 2 <li> tags completely. there way single id declaration? <li class="remove"><a href="#">ds</a></li> <li class="remove"><a href="#">xfg</a></li> <li><a href="#">ds</a></li> <------this stays 1 below <li><a href="#">xfg</a></li> you can $('.remove').remove(); // matches class="remove" gone completely. or click of it's <a> $('#ulid li a').click(function(){ $(this).closest('.remove').remove(); return false; // prevent link jump page. }); welcome stackoverflow.com don't forget accept answer

MySQL - Difference between Char and Varchar? -

possible duplicate: what's difference between varchar , char? what difference between char , varchar. a char field fixed length, , varchar variable length field. this means storage requirements different - char takes same amount of space regardless of store, whereas storage requirements varchar vary depending on specific string stored.

vb.net - Referencing an object using a variable string in Visual Basic 2010 -

i have several sets of similar objects (labels, progress bars) on form in visual basic 2010 on windows . in code, have collections contain data, needs pushed value/text property of each. i solution similar php in can assign values like: for id integer 0 count(collectionexample) lblexample{id}.text=collectionexample(variableid) ...and such loop through each of different lblexample's updated corresponding value. the issue have come cannot seem reference object on form using variable. have tried using callbyname("lblexample" + variableid, "text", calltype.set, examplecollection(variableid)) ... still can't combine string , variable reference object. any solutions on referring objects in vb2010 combining string prefix , variable string identifier, similar php's $variable{$variable} approach? edit: windows platform you add each of controls dictionary, using string key. then can access controls using string. here simple exam...

ios4 - Transmitting a string via UDP using cocoaasyncsocket -

i've been teaching myself objective-c on past few months; i'm building iphone app company. started (and still am) complete novice, until have had no problems finding answers questions @ various locations online. for final, , important, piece of app, need send simple string address/port via udp when button pressed. string, address, , port variables pulled object passed view controller. i have been digging around 2 days looking @ solutions , reading examples, reads greek me. i'm not sure major hunk of knowledge seem have missed out on, i'm @ total loss. learned cocoaasyncsocket , , how "simple" is, , sounds perfect need, can't seem wrap mind around it. i'm hoping here can break down me simple terms. here snippet of code i've been trying, no luck. code viewcontroller , asyncudpsocket.h imported: -(ibaction)udpbuttontwopressed:(id)sender { nsdata *mydata; mydata = [[nsdata alloc] initwithdata:([selectedobject valueforkey:@...

Access C# .net web service in android -

how can use .net web services using android? my code this... package webservices.pck; import org.ksoap2.soapenvelope; import org.ksoap2.serialization.soapobject; import org.ksoap2.serialization.soapserializationenvelope; import org.ksoap2.transport.httptransportse; import android.widget.textview; import android.app.activity; import android.os.bundle; public class webservices extends activity { private static final string soap_action = "http://tempuri.org/helloworld"; private static final string method_name = "helloworld"; private static final string namespace = "http://tempuri.org/"; private static final string url = "http://ipaddress/service1.asmx"; //private object resultrequestsoap = null; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); textview tv = new textview(this); try { soapobject request = new soapobject(namespace, method_n...

audio - Draw waveform for microphone in flex, is it possible? -

i'm making audio recorder adobe flex (microphone, netstream), want current audio wave microphone display in visualization area, idea how can data? you'll need using flash player 10 think that's first time got access to microphone apis. then there's simple function can call microphone data: private var soundbytes:bytearray = new bytearray; soundmixer.computespectrum(soundbytes, false); i call computespectrum code in enter frame handler , draw out wave form there. edit: don't want mislead you. think above code pre-recorded audio file. if want user microphone in flash 10. this: private var _mic:microphone; _mid = microphone.getmicrophone(); _mic.addeventlistener( sampledataevent.sample_data, onsampledata ); protected function onsampledata( event:sampledataevent ):void { while( event.data.bytesavailable ){ var n:number = event.data.readfloat(); } }

dynamic - YUI range slider separate ticksize for subranges -

my requirement typical. need price range dual-handle slider, based on current handle value, tick size (step size) change, example if price less 1500, tick size 50. between 1500 , 15000, tick size should become 100, between 15000 50000 tick size should become 500, , on. have achieved jquery, there other issues (like auto adjust of other handle), cannot solve. using yui. there way change tick size based on value of current handle? welcome. presuming mean pixel distance thumb hops when dragged, try this: var thumb = dualslider.maxslider.thumb; thumb.setxconstraint(thumb.leftconstraint, thumb.rightconstraint, newticksize); if mean value corresponds thumb placement uses different conversion factor pixel position "real" value, need implemented in function built translation.

Mathematica manipulate variables that are already defined -

is possible use mathematica's manipulate change variables have been declared? example: changeme = 8; p = somesortofplot[changeme]; manipulate[show[p],{changeme,1,10}] the basic idea want make plot changable value declare outside of manipulate. any ideas? one option use dynamic[] , localizevariables -> false. example: changeme = 8; p[x_] := plot[sin[t], {t, 1, x}]; { manipulate[p[changeme], {changeme, 2, 9}, localizevariables -> false], dynamic[changeme] (* line not needed, inserted see value *) } evaluating "changeme" after manipulate action retain last manipulate value. hth!

java - Currency code to currency symbol mapping -

good day, in database there table houses sale records. each house record there currency code (in iso 4217 format) field. possibly somehow currency symbol code use on presentation side ? thank you. p.s. trying resolve problem setting currency object (created currency.getinstance(currencycode)) decimalnumberformat setcurrency method , format value needed display, formatted value still without currency symbol. you can use currency object's getsymbol method. what symbol used depends on locale used see this , this. update, jan 2016: links dead. specific java 1.4/5 not relevant anymore. more details on currency formatting can found in https://docs.oracle.com/javase/tutorial/i18n/format/numberformat.html . links can found on waybackengine though.

Unexpected speed behaviour when benchmarking Perl regexs -

whilst discussing relative merits of using index() in perl search substrings decided write micro benchmark prove had seen before index faster regular expressions when looking substring. here benchmarking code: use strict; use warnings; use benchmark qw(:all); @random_data; (1..100000) { push(@random_data, int(rand(1000))); } $warn_about_counts = 0; $count = 100; $search = '99'; cmpthese($count, { 'using regex' => sub { $instances = 0; $regex = qr/$search/; foreach $i (@random_data) { $instances++ if $i =~ $regex; } warn $instances if $warn_about_counts; return; }, 'uncompiled regex scalar' => sub { $instances = 0; foreach $i (@random_data) { $instances++ if $i =~ /$search/; } warn $instances if $warn_about_counts; return; }, 'uncompiled regex literal' => sub { $instances = 0; foreach $i (@random_data) { $instances++ if $i =~ /99/; } warn $instance...

r - Rearrange data for ANOVA -

i haven't quite got head around r , how rearrange data. have old spss data file needs rearranging can conduct anova in r. my current data file has format: one <- matrix(c(1, 2, 777.75, 609.30, 700.50, 623.45, 701.50, 629.95, 820.06, 651.95,"nofear","nofear"), nr=2,dimnames=list(c("1", "2"), c("subject","aayy", "bbyy", "aazz", "bbzz", "xx"))) and need rearrange this: two <- matrix(c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 777.75, 701.5, 700.5, 820.06, 609.3, 629.95, 623.95, 651.95), nr=8, dimnames=list(c("1", "1", "1", "1", "2", "2", "2", "2"), c("subject","aa", "zz", "xx", "rt"))) i sure there easy way of doing it, rather hand coding. consideration. this should it. can twe...

sms - iphone app exit with "No SIM card installed" -

i use mfmessagecomposeviewcontroller sending in app sms. in iphone 4.0, if there no sim card, app exits. gives pop message "no sim card installed". delegate callback messagecomposeresultsent. application exits. there way prevent exiting? or how check if there sim card in phone? code snippets below: /* open system sms service, copying sms text in system clipboard. */ - (void) sendsmsasurlrequest { nsstring *phonenumber = friend.phonemobile; uipasteboard *pasteboard = [uipasteboard generalpasteboard]; nsstring *textutitype = (nsstring *)kuttypeutf8plaintext; // add mobilecoreservices.framework type. [pasteboard setvalue:[self buildsmstext] forpasteboardtype:textutitype]; nsstring *urlstring = [nsstring stringwithformat:@"sms:%@", phonenumber]; nsurl *url = [[nsurl alloc] initwithstring: urlstring]; [[uiapplication sharedapplication] openurl: url]; [url release]; } -(void) sendinappsms { mfmessagecomposeviewcontroller *c...