Posts

Showing posts from April, 2013

python - NLTK - when to normalize the text? -

i've finished gathering data plan use corpus, i'm bit confused whether should normalize text. plan tag & chunk corpus in future. of nltk's corpora lower case , others aren't. can shed light on subject, please? by "normalize" mean making lowercase? the decision whether lowercase dependent of plan do. purposes, lowercasing better because lowers sparsity of data (uppercase words rarer , might confuse system unless have massive corpus such statistics on capitalized words decent). in other tasks, case information might valuable. additionally, there other considerations you'll have make similar. example, should "can't" treated ["can't"] , ["can", "'t"] , or ["ca", "n't"] (i've seen 3 in different corpora). 7-year-old ? 1 long word? or 3 words should separated? that said, there's no reason reformat corpus. can have code make these changes on fly....

installation - Cannot install older version of ImageMagick via Homebrew -

i need install imagemagick 6.5.8 (or earlier might do), when checkout earlier commit, installs latest version (6.6.9-4). did this: $ git checkout -b im-6.5.6 ff414bb (then confirmed working tree shows correct version of imagemagick.rb, @url = .tar of version 6.5.6-5) $ brew install imagemagick (and says checking out tag 6.6.9-4 , proceeds install version) any appreciated. thx. hope managed find solution, if not. heres 1 worked me on related issue. brew install https://github.com/adamv/homebrew-alt/raw/master/versions/imagemagick-ruby186.rb this install imagemagic 6.5.9-8

physics - Projectile Distance/Time -

i'm making game , need figure out how long take object fall height. the object has initial y value (y), initial vertical velocity (vy), gravity constant (gravity), , vertical target distance supposed drop (destination). i can figure out using loop: int = 0; while(y < destination) { y += vy; vy += gravity; i++; } return i; the problem need several hundred objects , have every frame. is there way figure out using kind of formula? way can speed game while still figuring out problem. thanks you can solve explicitly using elementary physics (kinematics). given initial velocity v, constant acceleration , fixed distance x, time is: (1/2)at^2 + vt - x = 0 or at^2 + 2vt - 2x = 0 solve quadratic formula , take positive time.

c# - Operator overloading question -

suppose have class: public class vector { public float x { get; set; } public vector(float xvalue) { x = xvalue; } public static vector operator +(vector v1, vector v2) { return new vector(v1.x + v2.x); } } have derived class: public class myvector : vector { public static myvector operator +(myvector v1, myvector v2) { return new myvector(v1.x + v2.x); } public myvector(float xvalue):base(xvalue) { } } no if execute folowing code: vector v1 = new myvector(10); //type myvector vector v2 = new myvector(20); //type myvector vector v3 = v1 + v2; //executed operator of vector class here executed vector's + operator, type of v1 , v2 myvector , v3 vector type @ point. why happens? because type of variables v1 , v2 vector , not myvector . operator overloads static methods resolved compiler @ compile-time , not @ runtime; cannot overridden. v1 , v2 have...

ruby on rails - Confused by has_many and belongs_to associations -

i'm little bit confused here. have 2 models: user ticket a ticket belongs 1 user "reporter". a ticket belongs 1 user "assigned". a user has many tickets (twice ?) so here i've got: # table name: tickets # # id :integer not null, primary key # label :string(255) # content :text # reported_by_id :integer # assigned_to_id :integer # created_at :datetime # updated_at :datetime # class ticket < activerecord::base belongs_to :reported_by, :class_name => 'user' belongs_to :assigned_to, :class_name => 'user' end # table name: users # # id :integer not null, primary key # login :string(255) # password :string(255) # created_at :datetime # updated_at :datetime # class user < activerecord::base has_many :tickets, :class_name => 'ticket', :foreign_key => 'reported_by_id' has_many :tickets, :class_name => 'ticket...

Django: Field Error Unknown fields -

i installed os x lion, had reinstall python2.7. in doing upgraded django 1.3 1.2.3. when try , runserver, odd field error i'm having tough time deciphering. fielderror @ / unknown field(s) (a, m, s, e, g) specified note here model & form: class note(models.model): pub_date = models.datetimefield(default=datetime.now, auto_now_add=true, db_index=true) user = models.foreignkey(user, null=true, blank=true, related_name="writers") = models.foreignkey(user, null=true, blank=true, related_name="tost") message = models.charfield(default='', max_length=140) active = models.booleanfield(default=true) class noteform(forms.modelform): class meta: model = note fields = ('message') message = forms.charfield( label=_("sign guestbook"), widget=forms.textarea, required=true) try fields = ('message',) to create tuple 1 element.

c# - DbLinq generic extension method - string as keyselector? -

the following snippet indicates want: public static class dblinqextension { public static int maxid<t>(this dblinq.data.linq.table<t> table) t : class { var val = table.orderbydescending(x => "id").firstordefault(); return convert.toint32(val); } } with dbmetal i've generated mapping classes. every table have has column id (which integer) , want know max id. anyone idea how can snippet working?? thanks! i've found article: orderby string keyselector with suggestion applied code become: public static int maxid<t>(this dblinq.data.linq.table<t> table) t : class { var val = table.orderbydescending(createselectorexpression<t>("id")).firstordefault(); return convert.toint32(val); } private static expression<func<t, int32>> createselectorexpression<t>(string propertyname) t : class { var parameterexpression = expression.parameter(typeof(t)); return (...

What is the easiest way to share resources between UserControls in a WPF User Control library? -

there wpf user control library , 2 (or more) user controls in it. need use same style in both user controls. how can share style? example: this style: <style x:key="customlabelstyle" targettype="label"> ... </style> user control a: <usercontrol x:class="edu.wpf.example.usercontrola" ...xmlns stuff... > <grid> ... xaml markup... <label style="{staticresource customlabelstyle}"/> </grid> </usercontrol> usercontrol b: <usercontrol x:class="edu.wpf.example.usercontrolb" ...xmlns stuff... > <grid> ... xaml markup... <label style="{staticresource customlabelstyle}"/> </grid> </usercontrol> so how can share style between user controls in library without involving of application app.xaml resource dictionary? update i can add themes\generic.xaml library , define style there. in case have use compo...

iphone - CGContextAddEllipseInRect to CGImageRef to CGImageMaskCreate to CGContextClipToMask -

i haven't been able find 1 single example on internets teaches me how create circle on fly , use circle clip uiimage. here's code, unfortunately doesn't give me desired results. //create graphics context uigraphicsbeginimagecontext(cgsizemake(243, 243)); cgcontextref context = uigraphicsgetcurrentcontext(); //create object in context cgcontextaddellipseinrect(context, cgrectmake(0, 0, 243, 243)); cgcontextsetfillcolor(context, cgcolorgetcomponents([[uicolor whitecolor] cgcolor])); cgcontextfillpath(context); uiimage *image = uigraphicsgetimagefromcurrentimagecontext(); //create uiimage ellipse //get drawing image cgimageref maskimage = [image cgimage]; // mask image cgimageref maskref = cgimagemaskcreate(cgimagegetwidth(maskimage) , cgimagegetheight(maskimage) , cgimagegetbitspercomponent(maskimage) , cgimagegetbitsperpixel(maskimage) ...

php - Inserting number after alphanumeric group not followed by numeric group -

i have string contains 1 or more alphanumerical codes (starting letter) separated underscore. codes followed index number, separated underscore. i want insert index number (always 1) after each code not followed index. here's sample : one => one_1 one_tw2_tre_for => one_1_tw2_1_tre_1_for_1 one_tw2_tre_23_for => one_1_tw2_1_tre_23_for_1 one_3_tw2_4_tre_45 => one_3_tw2_4_tre_45 i can 2 calls preg_replace : // add '_1' after each code $s = preg_replace('/[a-za-z][a-za-z0-9]+/', '$0_1', $s); // remove '_1' when followed index $s = preg_replace('/_1_([0-9]+)/', '_$1', $s); i'm wondering if there's way 2 1 preg_replace (i tried lookahead , lookbehind, without success) or different way might faster, processor wise. thanks ! :-) preg_replace('/[a-za-z][a-za-z0-9]+(?!_[0-9]|[a-za-z0-9])/', '$0_1', $s); or, more concise: preg_replace('/[a-za-z][a-z...

c# - WPF bind control width to ListBox column width -

i wrote xaml follows: <usercontrol.resources> <gridviewcolumncollection x:key="gvcc"> <gridviewcolumn header="klient" displaymemberbinding="{binding customername}" width="80"> </gridviewcolumn> <gridviewcolumn header="budżet" displaymemberbinding="{binding budget, stringformat={}{0:c}}" width="80"> </gridviewcolumn> <gridviewcolumn header="zysk. zakł." displaymemberbinding="{binding expectedprofability, stringformat={}{0:c}}" width="80"> </gridviewcolumn> <gridviewcolumn header="zysk. real." displaymemberbinding="{binding realprofability, stringformat={}{0:c}}" width="80"> </gridviewcolu...

java - Mechanism to maintain service when internet connection is lost with application server -

we have centralised web app , database (running on glassfish , oracle) accessed multiple stations distributed country. at stations there data entered , read system (through browser). when (external) connection goes down between station , centralized web app stations continue function - store , present data, when connection returns data pushed central server maintaining database integrity. given willing change our app server or database if worth it, how best handled, there out of box solution this? install servers @ individual locations, replicate want share across them "routinely", , leave of other centralized, non-vital tasks (like, say, reporting) on central system. there not "out of box" solution. system centralized whatever reason it's centralized. you're asking decentralized. doing need reconsider why it's centralized in first place, , dependencies there because of centralization (such each site having instant access data ...

java - Synthetica & Synthetica Addons -

i looking getting synthetica , synthetica addons. interested in addons better jtable filtering, sorting, , customization ability. per demos seem have done pretty job. swing component libraries seem few , far between. have experience product? if can please give little bit of information regarding likes , dislikes support experience , money? thanks

c# - Could a System.Diagnostics.Process instance be garbage collected? -

i'm using system.diagnostics.process class convert wav file mp3 file in separated process. method job this: public void convertwavtomp3 (tempfile srcfile, string title, action<tempfile, exception> complete) { var argument_fmt = "-s --resample 16 --tt {0} --add-id3v2 {1} {2}"; var dstfile = new tempfile(path.gettempfilename()); var proc = new system.diagnostics.process (); proc.enableraisingevents = true; proc.startinfo.useshellexecute = false; proc.startinfo.filename = "lame"; proc.startinfo.arguments = string.format (argument_fmt, title, srcfile.path, dstfile.path); proc.exited += delegate(object sender, eventargs e) { proc.waitforexit(); srcfile.delete(); complete(dstfile, null); }...

iphone - CorePlot silent crash (possibly from scaleToFitPlots:) -

i have iphone app coreplot graph. have button placed next graph calls scaletofitplots: on graph when pressed. the problem app crashes when scaletofitplots: called. most of time there no console messages , no debugger messages there following repeated ten times warning: unable restore selected frame. there no stack trace crashed thread is 0 <????> or 0 -[cpgradient newaxialgradientinrect:] 1 <????> one of crash reports: incident identifier: 4f9b520f-14a9-460f-a47d-93662c41d80a crashreporter key: d83f6beafd9d721fc55a6cda5eb9b2926b753649 hardware model: ipad2,1 process: iq [297] path: /var/mobile/applications/18468a8b-79c8-42fa-a597-141cc91e54f2/iq.app/iq identifier: iq version: ??? (???) code type: arm (native) parent process: launchd [1] date/time: 2011-07-20 15:53:48.420 -0700 os version: iphone os 4.3.3 (8j2) report version: 104 exception type: exc_bad_access (sigbus) exception codes: kern_...

php - display all data from my User table in my database -

my question how display data users table in database? have this. $loop = mysql_query(“show users $dbname”) or die (‘cannot select tables’); $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $result = mysql_query(“select * users”, $link) or die (‘cannot select tables’); while ($row = mysql_fetch_assoc($result)) { echo $row['firstname']; echo $row['lastname']; echo $row['address']; echo $row['age']; } mysql_free_result($result);

Javascript UTC Date issue in mobile browsers -

i'm making jquery mobile application , using phone gap deploy multiple platforms. unfortunately, i'm noticing there seems inconsistent behavior between desktop , mobile compatibilities in using javascript's family of utc date functions. has experienced similar issues android, iphone, , / or blackberry in regard? think it's native browser issue chrome , firefox seem have expected behavior. the normal usage of: var d = new date(); var utc_month = d.getutcmonth(); yields int value desktop browsers , nan value utc_month on mobile browsers. thoughts? wasn't able find on phonegap exposing datetime native browsers~ the example works fine me on android 2.2 phonegap (after changing 'int utc_month ...' 'var utc_month ...'). do have same typo in code? ran following: var utc_month = d.getutcmonth(); alert (utc_month); 6 gets alerted.

iphone - No options in UIDocumentInteractionController -

is possible check how many applications available on device able handle particular file type? basically, have button in application allows users open-in application, don't want show if there no possible applications open document in. okay, figured out ugly ugly hack, seemed work... love find better way. create header file extension: // uidocumentinteractioncontroller+willshowopenin.h #import <foundation/foundation.h> @interface uidocumentinteractioncontroller (willshowopenin) - (bool)willshowopenin; + (bool)willshowopeninforurl:(nsurl *)filepathurl; @end and implement: // uidocumentinteractioncontroller+willshowopenin.m #import "uidocumentinteractioncontroller+willshowopenin.h" @implementation uidocumentinteractioncontroller (willshowopenin) - (bool)willshowopenin { id <uidocumentinteractioncontrollerdelegate> olddelegate = self.delegate; self.delegate = nil; uiwindow *window = [[[uiapplication sharedapplication] windows...

java - Is calling ServerSocket.close() sufficient enough to close a port? -

i have java code looks similar this: private void startserver() throws ioexception { urlclassloader classloader = null; system.out.println("opening server socket listening on " + port_number); try { server = new serversocket(port_number); server.setsotimeout(10000); connected = true; system.out.println("server listening on port " + port_number); } catch (ioexception e) { system.err.println("could not start server on port " + port_number); e.printstacktrace(); connected = false; } while (connected) { // incoming request handler socket. socket socket = null; try { system.out.println("waiting client connection..."); // block waiting incoming connection. socket = server.accept(); if (socket == null) continue; .....

drawable - How to use Android-provided graphics in an application? -

i remember seeing how somewhere, i'm totally drawing blank right now. i'd use android "refresh" graphic in application, how reference it? there chart somewhere of graphics provided? easiest way in android sdk location (on machine, *c:\projects\android\android-sdk-windows-1.5_r1*): in platforms folder separate directory each version of android. pick version of choice , open *data\res* folder: there number of drawable folders platform graphics. go wild copying them own app.

asp.net - Application_error event not firing after publishing -

i know has been asked lot of times, not things working posts. i have implemented application_error method in global.asax file log , send email unhandled exceptions. works fine when running on visual studio, publish test server, application_event stops firing. no log entry made text file , no email sent. precompiledapp.config file present in root directory, along app_global.asax.compiled, app_global.asax.dll in bin folder. global.asax file not present after publish website. i have tried removing precompiledapp.config file, doesn't work. have tried adding global.asax file root directory, doesn't work. have tried <customerrors mode="off" /> and <customerrors mode="on" defaultredirect="error page.aspx" /> in web.config file....nothing works. i added line page_load of page: response.write("<br/>applicationinstance: " + context.applicationinstance.gettype().fullname); it returns applicatio...

javascript - RIA application optimization & minimization -

i have huge asp .net mvc3 application tons of js (almost jquery plugins) , css bunches each page. bunches necessary 1 page, common. please advice me ways reduce application latency , reach speed maximum. keep in mind post embedding content inline , going implement in project. thing going output content minimization. recommend me texts it? thoughts, advices, recommendations apprechiated. hope , in advance! iis7.5 just found this great article check out link minifying , combining css & javascript files programmatically .net mvc. combining files on fly also @ this: xpedite

google app engine - How to read/write (String and Array like) variables during Mapreduce iteration? -

i trying process large amounts of data of order 5-10 million. i running mapper in googleappengine/java task rate of 100/s , bucket-size of 100 billing enabled. reading , writing datastore during map iteration affects overall speed very large extent. if can read/write string , array variables other simple counters, speed things large extent. background: trying dedupe large data respect multiple text fields. must run n map jobs , compare rest of data.

database - Is it better to use one complex query or several simpler ones? -

which option better: writing complex query having large number of joins, or writing 2 queries 1 after other, applying obtained result set of processed query on other. when junior db person once worked year in marketing dept had free time did each task 2 or 3 different ways. made habit of writing 1 mega-select grabbed in 1 go , comparing script built interim tables of selected primary keys , once had correct keys went , got data values. in every case second method faster. cases wasn't when dealing small number of small tables. noticeably faster of course large tables , multiple joins. i got habit of select required primary keys tablea, select required primary keys tableb, etc. join them , select final set of primary keys. use selected primary keys go tables , data values. as dba understand method resulted in less purging of data cache , played nicer others using db (as mentioned amir raminfar). it require use of temporary tables places / dba don'...

php - Building on file formats with text -

evening stack, so i'm building own little custom file type site use can pull out data file , place appropiate areas of website. i'm able save file format , open , extract data file. seem having trouble locolising data want file. i've seperated each set of data ';'. here reading code. function read_suggestion($suggest) { // global variables global $sug_reports; // file need open $sugid = $suggest; $filename = "reports/suggestions/" . $sug_reports[$sugid]; // open file $handler = fopen($filename, "a+"); // load file variable $raw_data = fread($handler, filesize($filename)); // first lets set these indexes $file_data = array ("title" => "", "date_submitted" => "", "data" => "", "by" => ""); // find title $current = 0; $first_stop = strpos($raw_data, ";"); $last_stop = strpos($raw_data, ";", $first_stop); // read first stop ma...

function - Python recursive crawling for urls -

i have method when supplied list of links child links , on , forth: def crawlsite(self, linkslist): finallist = [] link in list(linkslist): if link not in finallist: print link finallist.append(link) childlinks = self.getalluniquelinks(link) length = len(childlinks) print 'total links page: ' + str(length) self.crawlsite(childlinks) return finallist it repeat same set of links , can't seem figure out. when move self.crawlsite(childlinks) inside of if statement. first item in list repeated on , over. background on self.getalluniquelinks(link) method list of links given page. filters click-able links within given domain. trying click-able links website. if isn't desired approach. recommend better method can exact same thing. please consider new python , might not understand more complex approaches. please explain thought processes. if don't mind :) ...

php - sql 'incorrect integer value' message -

can see why getting following error when try submit this? know whole null vs '' thing don't have '' should causing this. new mysql great. incorrect integer value='' column 'two' @ row 1 <?php $db_host = "localhost"; $db_username = "test"; $db_pass = "example"; $db_name = "questions"; @mysql_connect("$db_host","$db_username","$db_pass") or die ("could not connect mysql"); @mysql_select_db("$db_name") or die ("no database"); if ($_post['parse_var'] == "contactform"){ $onefield = $_post['one']; $twofield = $_post['two']; $threefield = $_post['three']; $nonefield = $_post['none']; $surveyfield = $_post['survey']; $questionfield = $_post['questions']; $guestfield = $_post['guest']; $homefield = $_post['home']; $selected_radio = $_post['radio']; i...

java - overridden method cant throw exception -

while compiling following code have got error @override public void routecustomerrequest (int choice) throws unsupportedcustomerrequestexception{ //throw new unsupportedoperationexception("not supported yet."); switch(choice) { case '1': system.out.println("1. add new customer"); break; default : throw unsupportedcustomerrequestexception("hehehe"); } } // constructor class public class unsupportedcustomerrequestexception extends exception { public unsupportedcustomerrequestexception(string bong){ system.out.println(bong); } } its interface is /* * change template, choose tools | templates * , open template in editor. */ package bankingappication; /** * * @author training */ public interface ibankingservices { public static string bankerresgistrationcode=null; public void enquirecustomer(); public int presentservicemenu(); public ...

jquery and php to grab the contents from a selected row When onclick of a selected checbox -

attached source code of php , jquery , gives undefined alert ...later displays contents in table... need display 1 user clicks on checkbox..... mistake in code. --------------------php--------------------------------------------------------- </script> <script src="<?=base_url();?>js/calendar.js" type="text/javascript"></script> <form name="inwardproductlist" action="" method="post" > <table width="100%" border="0" cellpadding="0" cellspacing="0" align="center" class="formtable"> <tr> <td height="23" colspan="8" align="center" valign="middle" bgcolor="#ffffff" class="rows"><b>cart display</b></td> </tr> <tr> <td height="66" align="left...

php - Can I parse the directory listing of an external webpage? -

is possible parse directory listing of webpage external given webpage accessible , shows list of files when access it. want know possible parse files dynamically in php , how? -thank you sorry being not clear. mean directory listing such as: http://www.ibiblio.org/pub/ (index of /..) , ability read content array or easy manipulate in script you can use preg_match or domdocument for case: $contents = file_get_contents("http://www.ibiblio.org/pub/"); preg_match_all("|href=[\"'](.*?)[\"']|", $contents, $hrefs); var_dump($hrefs); if want take @ working demo .

Eclipse Compare Editor: difference between the 'next difference' and 'next change' buttons? -

Image
a simple question today... in eclipse compare editor (right click file - compare with...) difference between 'next difference' , 'next change' buttons? seem same thing. its bugging me! thanks the help page "compare editor" states: a change portion of text has been modified within line, , the difference section of file consisting of 1 or more lines, , can contain many changes. differences marked blue color, changes red. so if each of differences one change within one line each time... yes, changes , differences match exactly.

jqgrid number formatter use -

in formatter, i've got following code: formatter: { number: { decimalseparator: ".", thousandsseparator: " ", decimalplaces: 4, defaultvalue: '0.0000' } }, and in colmodel have: { name: 'salesprice', index: 'salesprice', width: 90, align: 'left', formatter:'number', editable: true, editoptions: { readonly: true } } my datatype set "local" when first display form, "0.00" , not "0.0000" hoping for. morever, in inline editing mode, salesprice value changes depending upon other cells in grid. after updates salesprice value shown integer. what doing wrong? edit: more complete code $("#customerorderlinelist").jqgrid({ // url: 'someurl', datatype: 'local', formatter: { number: { decimalseparator: ".", thousandsseparator: " ", deci...

java ee - single sign on for different applications. in J2EE applications -

i have 4 application , different technologies(php,.net , java) , 4 application having different database,and diff login page. i want create login page 4 application have 1 login page , after login newly created page skip login page of 4 application , next page after login must displayed. you should looking @ single sign on technologies. saml (security assertion markup language) 1 ingredient technology solve such requirements. have portal acting saml identity provider, , applications become saml service providers. many open source , commercial products available implement saml can integrate it.

mysqldump - mysqldum of database in remote server from localhost -

$command = "ssh dev@192.168.1.1 ls cd public_html/gforce/hrm mysqldump -uroot -pyipl123 gforce>gforcehrm111.sql"; system($command); code not working. how take database dump of remote server localhost. in advance. let's try command : mysqldump -h your server ip -p mysql server port -u user_name -p password db name > path of local system want save dump file

flash - Is there any way to Play music as background service in playbook? -

i have made music player blackberry playbook , working fine .my problem want play music background service if user switches between other app . music play continuously .. thanks you can using line first line of application qnxsystem.system.inactivepowermode = qnxsystempowermode.throttled; from app play sound while app in background , when playbook on standby state.

Bigtable Practical Example -

can provide real-world example of how data structured within bigtable? please talk search engine, social networking or other familiar point of view illustrates , pragmatically how row -> column family -> column combo superior traditional normalized relational approaches. reading original google white paper helpful: http://static.googleusercontent.com/external_content/untrusted_dlcp/labs.google.com/en//papers/bigtable-osdi06.pdf as comprehensive list of information sources on google data architecture: http://highscalability.com/google-architecture update: 11/4/14 a new version of google white paper pdf can found here: http://static.googleusercontent.com/media/research.google.com/en/us/archive/bigtable-osdi06.pdf

ggplot2 - How to change points and add a regression to a cloudplot (using R)? -

Image
to make clear i'm asking i've created easy example. step 1 create data: gender <- factor(rep(c(1, 2), c(43, 41)), levels = c(1, 2),labels = c("male", "female")) numberofdrugs <- rpois(84, 50) + 1 geneticvalue <- rpois(84,75) death <- rpois(42,50) + 15 y <- data.frame(death, numberofdrugs, geneticvalue, gender) so these random dates merged 1 data.frame . these dates i'd plot cloud can differ between males , females , add 2 simple regressions (one females , 1 males). i've started, couldn't point want be. please see below i've done far: require(lattice) cloud(y$death~y$numberofdrugs*geneticvalue) xmale <- subset(y, gender=="male") xfemale <- subset(y, gender=="female") death.lm.male <- lm(death~numberofdrugs+geneticvalue, data=xmale) death.lm.female <- lm(death~numberofdrugs+geneticvalue, data=xfemale) how can make different points males or females when using cloud command (for exam...

wxpython - Compile app with Pyinstaller, but do not launch cmd when running resulting exe -

how can "compile" gui application pyinstaller, , gui wxpython generates, when run executable? @ moment, when run exe, cmd window pops up, , wxpython window. nice when i'm debugging, isn't gonna use (probably oposite!) when distribute app. i think need set console argument in exe class false. see http://www.blog.pythonlibrary.org/2010/08/10/a-pyinstaller-tutorial-build-a-binary-series/ near end spec file worked me. looks can spec file include setting automatically passing "-w" when create it. that's mentioned in tutorial.

FOREIGN KEY MULTI FIELD HELP! -

i have 2 table table class ( school varchar(50), year varchar(50), grade varchar(50), classname varchar(50), primary key (school,year,grade,classname) ) table student ( student_id varchar(50) primary key, detail varchar(50) ) now, want subclass students. how create reference? just else does... create table class ( id int not null auto_increment primary key, -- create key column school varchar(50), year varchar(50), grade varchar(50), classname varchar(50), unique (school,year,grade,classname) ); create table student ( student_id varchar(50) primary key, class_id int references class, -- reference key detail varchar(50) );

Android custom adapter for listview -

i have custom listview i'm displaying images json input. http://i.imgur.com/kile5.png i'm kind of confused when pass in value number of stars in yellow colour items. value passed in basketball 3rd item in list 1,2,3 yellow stars meaning item 1 should displaying 1 star, item 2, 2 stars , item 3, 3 stars. it seems item 1 getting value of item 3. reading left of item, star1, star2 , on until star5. refer following code custom adapter: public class myadapter extends arrayadapter<applicationitem> { int resource; string response; context context; public imageloader imageloader; private activity activity; private static layoutinflater inflater=null; //initialize adapter public myadapter(context context, int resource, activity activity, list<applicationitem> items) { super(context, resource, items); this.resource=resource; imageloader=new imageloader(activity.getapplicationcontext()); inflater = (layoutinflater)activity.ge...

.net - XQSharp XSLT2 performance tuning -

i have real time application uses xslt1 , want upgrade xslt2. using microsoft xslt1 engine performs specific xml , xsl within 0.1 second. for xslt2 transformation created function uses xqsharp perform xslt2 transformation. used same xml , xsl , transformation took 0.9 second. i analyzed code , turns out more 90% of processing time caused line : dim query xslt = xslt.compile(new stringreader(inputxsl), querysettings) my question of there way speed process ? for example changing querysettings? my full code <webmethod()> _ public function xsltxqsharp(byval inputxml string, byval inputxsl string) string dim nametable xmlnametable = new nametable() dim xmlreadersettings new xmlreadersettings() xmlreadersettings.nametable = nametable dim document xdmdocument using reader new stringreader(inputxml) using xmlreader xmlreader = xmlreader.create(reader, xmlreadersettings) document = new xdmd...

.net - Parse HTML as ASP using Web.config but getting error when JavaScript is in the page -

i edited web.config file have .html files parse asp. here line added under : <handlers> <add name="html mapping" path="*.html" verb="*" modules="isapimodule" scriptprocessor="c:\windows\system32\inetsrv\asp.dll" resourcetype="unspecified" /> </handlers> it works fine of pages, pages have embedded javascript in them, don't load , produce error 500 page. don't know why or do! when remove references javascript in pages, load fine again. can help? it sounds javascript tags being interpreted server-side script tags, maybe. since asp can't compile them you're getting internal server error. could show like? specify type="text/javascript" ?

parallelly execute blocking calls in python -

i need blocking xmlrpc call python script several physical server simultaneously , perform actions based on response each server independently. explain in detail let assume following pseudo code while true: response=call_to_server1() #blocking , takes long time if response==this: i want servers simultaneously , independently same script use threading module.

objective c - UIImage UIImageJPEGRepresentation safe to UIImage -

i need perform uiimagejpegrepresentation method , after save not file, need save uiimage. please.. i have no idea why wanting go uiimage jpeg data , right uiimage, [uiimage imagewithdata:jpegdata] should it.

fedora11 - Install Sametime connect on Fedora 11 Leonidas machine -

i have installed ibm lotus sametime client on fedora 11 leonidas box. have following rpms installed, compat-libstdc++-33-3.2.3-61.i386.rpm sametime-connect-lin-7.5.1-1.i386.rpm xterm-237-1.fc10.i386.rpm while opening sametime client, tries open eclipse ide , after both same time cliet window , eclipse ide window getting closed abruptly. could please let me know if there way resolve error. thanks, ricks. i have installed sametime 8.5.1 in fedora 14 , ubuntu 11.10 without issue. follow below url install , download sametime 8.5.1 version. http://ubuntulinux.co.in/blog/ubuntu/ibm-sametime-installation-in-linux/ video tutorial installing sametime http://www.youtube.com/watch?v=vd9rehwawm0