Posts

Showing posts from September, 2010

oracle - Determine which values are not in sql table -

oracle - Determine which values are not in sql table - i have query in oracle: select * table col2 in (1,2,3,4); lets got result col1 | col2 ----------- 1 b 2 my 'in (1,2,3,4)' part has 20 or more options, how can determinate values don't found in table? in illustration 3 , 4 doesn't exist in table you can't in way want. you need insert values want find table , select values don't exist in desired table. lets info want find in a , want know doesn't exist in b . select * table_a not exists (select * table_b b b.col1 = a.col1); sql oracle

datetime - Batch For Loop w/ Timestamp -

datetime - Batch For Loop w/ Timestamp - i need rename multiple files in loop , include time stamp... struggles begin updating timestamp each file file has unique name. setlocal enabledelayedexpansion set date=%date:~-4,4%%date:~-10,2%%date:~-7,2% /f %%a in ('dir /b tca_*') (set time=%time:~-11,2%%time:~-8,2%%time:~-5,2%%time:~-2,2% ren %%a %date%tca_%time%.txt) thanks while in loop, variables don't update. circumnavigate this, setlocal enabledelayedexpansion script added. basically, if want them update, need encase them in exclamation marks (!) instead of percent signs (%). datetime for-loop batch-processing batch-rename

c - How to calculate the gcd of two numbers via Euclidean's algorithm -

c - How to calculate the gcd of two numbers via Euclidean's algorithm - i have written sample programme calculate gcd of 2 numbers. here is: #include stdio.h int main(void) { int m, n, rem; printf("enter 2 numbers consecutively(with space between them): "); scanf("%d %d", &m, &n); while (m) { n = m % n; //problem here n = rem; } printf("%d gcd", rem); homecoming 0; } i think supposed store output of modulo operator statement in rem far programme not respond input given. can give me clue. can give me clue. for starters you're not changing m within loop can't end. c

c# - How to Disable Grid View Row After File Upload Control Completes File Uploading Operation -

c# - How to Disable Grid View Row After File Upload Control Completes File Uploading Operation - i have grid view in there 3 fields. first info bound field, sec template field contains text box command , 3rd 1 time again template field contains fileupload control. i want disable grid view row when file upload command completes file upload operation. my code grid binding : using system; using system.collections.generic; using system.linq; using system.web; using system.web.ui; using system.web.ui.webcontrols; using system.data; using system.data.sqlclient; public partial class gr4 : system.web.ui.page { sqlconnection cn; sqlcommand cmd; sqldataadapter da; dataset ds; protected void page_load(object sender, eventargs e) { cn = new sqlconnection("data source=amir-pc\\mohemmad;initial catalog=crm_investplus;integrated security=true"); string query = "select capacity dealer_license_capacity id='d00001' , software_id=...

python - Robot Framework installation issue -

python - Robot Framework installation issue - whenever seek install robot framework. getting error message below. close failed in file object destructor: sys.excepthook missing lost sys.stderr what issue? i installing robotframework-2.6.3.win32 python2.7.2 i'm not sure causing specific issue, find using pip or easy_install works installing robotframework , plugins on windows python robotframework

unit testing - Cakephp Fixtures automatic truncate table not working properly -

unit testing - Cakephp Fixtures automatic truncate table not working properly - i switched on cakephp 2.2.5 2.3 , auto-truncate table no longer working in 2.3. what did in 2.2.5 testing framework using little tables no relations aka foreign keys constraints , fixture import , auto-truncate table worked flawlessly. until confirmed wanted utilize cakephp , started developing application using caketestcase again. stopped working. info still in test database after imported first time. sec time indicate fails auto-load fixtures because info same ids exist. so started suspect because foreign key constraints had in current tables. i searched web , noticed quite lot of people having same issue there isn't real solution yet. the 1 seems solution here: http://cakephp.lighthouseapp.com/projects/42648/tickets/2905-tests-fixture-table-ar-not-truncate-when-droptable-false however, tried turning on $droptables = true, didn't work. , tried modifying cakefixturemanager.p...

Jquery use selected.text for value of focus input element -

Jquery use selected.text for value of focus input element - i'm trying "show" div contains select when input element has focus. when item has been selected, want utilize value input element , "hide" div. the div displays when click in input field , hides after select item, value not show in input val() attribute. $(document).ready(function() { $('.querytd').focus(function(e) { $('.selectdiv').show(); }); $('.querytd').blur(function(e) { $('.selectdiv').hide(); $('.querytd').val($('.selectdiv:selected').text); }); }); <tr align="center"><td> <cfinput name="telemate_daily_query_emailto#newqueryrecordnumber#" type="text" value="" size="40" maxsize="40"></td> <td colspan="8"> <cfinput name="telemate_daily_query_description#newqueryrecordnumber#" type="text" val...

java - eBay Trading API getOrders: check if order is marked as shipped -

java - eBay Trading API getOrders: check if order is marked as shipped - i want orders ebay seller account. using getorders api works fine. all of orders marked active or finish depending on status of order. when mark them shipped (by api or on website) orders remain active or finish after re-crawling. expected order status' shipped. i utilize ebay java sdk version 797 every api phone call returns "success" how figure out if order marked shipped? does depend on country? i'm using high german ebay sandbox ( webgui german/english mix ;) ) i'm using .com api-urls here's code: getorderscall phone call = new getorderscall(context); detaillevelcodetype[] detaillevels = new detaillevelcodetype[]{ detaillevelcodetype.return_all }; call.setdetaillevel(detaillevels); call.setorderrole(tradingrolecodetype.seller); call.setnumberofdays(30); ordertype[] orders; seek { orders = call.getorders(); for(ordertype order : orders) sys...

php - Find and convert symbol to anchors -

php - Find and convert symbol to anchors - sorry if question duplicate of ones, couldn't find :-/ hey guys, guessing it's simple regexp question help me out you? regexps complicated me :-) in illustration : @2 lorem ipsum dolor sit down amet, consectetur adipiscing elit. praesent sit down amet quam ante, sit down amet consectetur ante. ut non urna in quam adipiscing consectetur et sed lorem. donec venenatis vehicula porttitor. i want convert @2 to <a href="#2">@2</a> but user may type "@2lorem.." without space or may @38427. how can grab '@' symbol , numbers after , convert anchor? edit: , @ may in middle of text may not in beginning. preg_replace('/@(\d+)/', '<a name="#$1">@$1</a>', $string) sample: php > $x = 'abc @234lorem def'; php > echo preg_replace('/@(\d+)/', '<a name="#$1">@$1</a>', $x); abc ...

Html: open the page in a new window. target="_blanck" - is that a typo? -

Html: open the page in a new window. target="_blanck" - is that a typo? - i have found (with letter c) target="_blanck" instead of expected target="_blank" in project written else. works , opens link in new window. typo or missing something? the target attribute refers contents of link loaded in browser. browser set contents of page within window/frame name, long it's not 1 of special values _blank , _self , _top or _parent . see frame target references section in w3 spec. except reserved names listed below, frame target names (%frametarget; in dtd) must begin alphabetic character (a-za-z). user agents should ignore other target names. the next target names reserved , have special meanings. _blank user agent should load designated document in new, unnamed window. _self user agent should load document in same frame element refers target. _parent user agent should load document immediate frameset pare...

django - How to access the previous row from the database -

django - How to access the previous row from the database - views.py apptruepower = form.cleaned_data['truepower_reading'] appapparent = form.cleaned_data['apparentpower_reading'] appvoltage = form.cleaned_data['voltage_reading'] appdate = form.cleaned_data['date'] apptime = form.cleaned_data['time'] prevdate=kebreading.objects.latest("id") print prevdate.truepower_reading print id kebreading.objects.filter(id=id).update(truepower_reading=apptruepower,apparentpower_reading=appapparent, voltage_reading=appvoltage,datetime_reading=datetime.combine(appdate,apptime)) a=kebreading.objects.filter(id=id).values("truepower_reading") print b=kebreading.objects.filter(id=id).values("apparentpower_reading") ...

android - Program control flow to onDraw() -

android - Program control flow to onDraw() - i know when method protected void ondraw(final canvas canvas) {} will called. asking the command flow.constructor of class called other class.when command comes constructor phone call methods in class?? also want drawing when draw image touched , moved. used ontouchevent(motionevent event).but dont know how invoke ondraw after coding in ontouch.that alter coordinate values how phone call ondraw redraw image? can help? public class drawview extends view { paint paint = new paint(); public drawview(context context) { // todo auto-generated constructor stub super(context); } @override protected void ondraw(final canvas canvas) { // todo auto-generated method stub paint.setcolor(color.black); paint.setstrokewidth(3); canvas.drawrect(30, 350, 50, 400, paint); super.ondraw(canvas); // other drawings } @override public boolean ontouchevent(motionevent event) { // todo auto-...

ruby on rails 3 - Heroku: Could not find libv8-3.15.11.1 in any of the sources -

ruby on rails 3 - Heroku: Could not find libv8-3.15.11.1 in any of the sources - i know there lot of these questions on github (i've looked through of them), none of answers have worked me. i getting error "could not find libv8-3.15.11.1 in of sources" when seek "git force heroku master." specify version of libv8 in gemfile (with gem "libv8", "~> 3.11.8.13"), , think reflected in gemfile.lock ("libv8 (3.11.8.13)"). don't understand why it's looking version 3.15.11.1 when i've specified 3.11.8.13. i made sure changes gemfiles committed (when "git status", "nothing commit (working directory clean)." i tried removing heroku , re-adding (with "git remote rm heroku" , "git force heroku master"). gemfile: source 'https://rubygems.org' gem 'rails', '3.2.8' grouping :development gem 'sqlite3' end # bundle border rails inste...

java - User input arrays -

java - User input arrays - i trying create programme sorts user inputted integers greatest least. need find way print maximum , minimum numbers. code sorting fine when had defined values have switched user input sends "0"s reason. code import java.util.scanner; public class sortinteger { public static void main(string [] args) { scanner input = new scanner(system.in); system.out.println("please input 3 numbers"); int num = input.nextint(); int number [] = new int [num]; //sorting array int temp; boolean right = false; // forces sorting go on till numbers in order while(correct ==false){ right = true; for(int = 0; i>number.length-1; i++ ){ if(number [i] > number [i+1]){ temp = number [i+1]; number [i+1] = number[i]; number[i]= temp; ...

objective c - Cocoa : Image Well - Custom NSImageView class doesn't show image? -

objective c - Cocoa : Image Well - Custom NSImageView class doesn't show image? - i added imagewell via interface builder, set image, ran , well. (the image displayed). however, if alter custom class 1 of own (nsimageview subclass), image no longer displayed. bare class nil added. reason why wouldn't work? i tried manually set image in initwithframe method: [self setimage:[nsimage imagenamed:@"image.png"]]; [self setimagealignment:nsimagealigncenter]; nslog(@"image valid? %@", [[self image] isvalid] ? @"yes" : @"no"); but did not work. no errors, no image shown. any ideas might mistake? make sure phone call super drawrect within drawrect method. - (void)drawrect:(nsrect)dirtyrect { [super drawrect:dirtyrect]; // drawing code here. } objective-c cocoa nsimage nsimageview

How to install ClickOnce app without prompting the user? -

How to install ClickOnce app without prompting the user? - is there way install clickonce application without prompting user @ all? i'm talking "run/don't run" user gets first time he/she runs application. there seem clues here believe it's skipping "elevation" (uac) , security prompts, , not actual initial "run/don't run" screen. i can find info how silently update application that's been installed in past, nil silently installing application first time. i found this post seems related, again, not sure if we're talking same user prompt... there no way install clickonce application without prompting user. if want user able double-click on it, , installs without verifying user, don't utilize clickonce. frankly, in experience, malware , packages pushed sms in enterprise environment install without prompting user. clickonce

indexing - Delaunay triangle OpenCV -

indexing - Delaunay triangle OpenCV - i wondering if @ possible retrieve indices of neighboring vertices in cvsubdiv2d* subdivision using opencv. cvsubdiv2dpoint* pt = cvsubdiv2dedgeorg( cvsubdiv2dedge border ); index= pt->id; so if have list of coordinates, can find out illustration point 15 list connected via border points 300, 210, 400 , 76 list. i know getting coordinates no problem, i'm not interested in that. want sure i'm not wasting time trying retrieve indices way , otherwise seek find other solution. the way managed solve problem modifying cvpoint2d32f struct definition within types_c.h source file in order store index of point along coordinates after inserting subdivision. here step-by-step procedure of did: open types_c.h source file (which in case located in ~/opencv-2.4.3/modules/core/include/opencv2/core/types_c.h ). add together field cvpoint2d32f struct used store index of points insert subdivision. example: typedef st...

java - how to make sure int is assigned a unique id for that thread -

java - how to make sure int is assigned a unique id for that thread - i need insert database has 2 columns- id primarykey string business relationship string so means each thread should using unique id , need store same id in account column also. suppose if id 1 in database should stored id business relationship 1 somestring+1 2 somestring+2 3 somestring+3 .... .. 100 somestring+100 i concatenating userid string in business relationship column. below multithreaded code spawn multiple threads- , each thread getting new unique id everytime using atomicinteger that. , insert id id column , append id account column but somehow in below programme have seen in database is- id business relationship 1 string+2 2 string+1 3 string+3 which not right. should this- id business relationship 1 string+1 2 string+2 3 string+3 below code public static void main(string[] args) { final int noofthreads = 4; final int no...

Is there any way to access histogram in excel using visual c#? -

Is there any way to access histogram in excel using visual c#? - i created, opened , saved info excel file. want draw histogram using info in excel help of c#.anyone please suggest me way this.thanks in advance. c#

python - How to deploy Django code without restarting web server -

python - How to deploy Django code without restarting web server - i decided move php , start using django. have installed python , django on web server. how can code python/django program, throw server on ftp, , run without need ssh server , restart django server every time? what method run django codes same way run php code (having server running time if possible)? my server runs centos 5.8 , apache. edit: alright recommend tutorial ever want setup django on web server , recommendation after reading lot of posts. using django on nginx web server powerful performance https://code.djangoproject.com/wiki/djangoandnginx you can't magically create django run php. please @ deployment documentation, it's of best around. you'll see step step instructions apache. as not having ssh every time load new code, best tool job fabric . http://docs.fabfile.org/en/1.5/ fabric amazing tool extremely easy install , configure, lets run commands on remote machine ...

xml - Perl insert new element into array subarray -

xml - Perl insert new element into array subarray - hello trying insert new element go <explicit-group name="cdev"> <aip-address>1.1.1.1</aip-address> <aip-address>2.2.2.2</aip-address> <aip-address>3.3.3.3</aip-address> to <explicit-group name="cdev"> <aip-address>1.1.1.1</aip-address> <aip-address>2.2.2.2</aip-address> <aip-address>3.3.3.3</aip-address> <aip-address>99.99.99.254</aip-address> the code have follows have been reading references , de referencing 2 days , still cant it. trying impossible or can show me how. thanks! use strict; utilize xml::simple; utilize data::dumper; $xs = xml::simple->new( xmldecl => '<?xml version="1.0" encoding="utf-8"?>', forcearray => [ 'item' ], keyattr => { }, rootname => 'sg-distribut...

Rails 3.2 render to application.html.erb -

Rails 3.2 render to application.html.erb - i want render page message view in application.html.erb returns me "'nil' not activemodel-compatible object returns valid partial path." know there application controller cant find yet.. here have tree of views: -views -layouts -application.html.erb -messages -index.html.erb -_message.html.erb -create.js.erb how can set messages/index in application view? ruby-on-rails render

flex - ios Mobile project, how to add MXML? -

flex - ios Mobile project, how to add MXML? - i downloaded new flashbuilder , created new project ios. i cannot add together new mxml component it, says there no flex project? mxml not supported? thank you i'm tool. created "actionscript mobile application". no wonder. flex flash-builder

android - keyboard reset radiogroup value -

android - keyboard reset radiogroup value - i have custom listview radiogroup in each row. when alter checked radio button, phone call dialog edittext fields (using oncheckedchanged() method). but, when focused edittext write something, lose checked radiobuttons covered keyboard, , grouping returns default alternative selected. can help me? list adapter @override public view getview(int position, view convertview, viewgroup parent) { view row = convertview; contractitemholder cih = new contractitemholder(); if (row == null){ layoutinflater inflater = ((activity)context).getlayoutinflater(); row = inflater.inflate(r.layout.row_proposals_item, parent, false); cih.settvitemtitle((textview)row.findviewbyid(r.id.textviewitemtitle)); cih.setrgitemstatus((radiogroup)row.findviewbyid(r.id.radiogroupstatus)); row.settag(cih); }else { cih=(contractitemholder)row.gettag(); } final contractitem ci = list.get(pos...

Merge problems in mercurial because of wrong merge base: what's happening? -

Merge problems in mercurial because of wrong merge base: what's happening? - i have repository in 2 revisions (14321 , 14319) share parent (14318) - both changesets direct children of 14318. nevertheless, revision set query ancestor(14321, 14319) not homecoming 14318, instead returns much older changeset. what's happening? screenshot in tortoisehg: background: encountered odd merge conflicts turned out caused mercurial trying re-apply changes had been merged. able track downwards odd selection of merge base of operations caused both heads include same changes - don't understand why happened , how can prevent in future (i chose dvcs partly avoid these kinds of problems in first place...) the image shows there not 1 2 mutual ancestors. so, looks criss-cross merge case merge problems arise chosing 1 or mutual ancestor. references: http://bz.selenic.com/show_bug.cgi?id=1327#c18 http://www.gelato.unsw.edu.au/archives/git/0504/2279.html http://wi...

r - gWidgets packaging -

r - gWidgets packaging - i've made gui r simulation , bound function in it's own .r file in r folder of packages directory: gui <- function(){ mainwin <- gwindow("speear - simulation of plant-pathogen effectors in evolutionary arms races") introtext <- glabel("speear - simulation of plant-pathogen effectors in evolutionary arms races, version 1.1 bundle maintained ben ward. <b.ward@uea.ac.uk>", cont = mainwin, markup=true) moretext <- glabel("to begin, edit settings of simulation. settings stored in matrix , can read in .r object files. help , documentation click help button, or utilize r's documentation system.", cont=mainwin) main_grp <- ggroup(container = mainwin) settings_grp <- ggroup(container = main_grp, horizontal=false) settings_frame <- gframe("settings", cont=settings_grp) editsetbutton <- gbutton("edit settings...

ruby on rails - Bundle install fails - Gem using github url - What is wrong? -

ruby on rails - Bundle install fails - Gem using github url - What is wrong? - in gemfile have: gem 'capistrano-cook', github: "subsis/capistrano-cook" here error log when running bundle install in ruby/rails console: http://pastie.org/private/aftbq3rukjdthua4lfjzbw c:\rails\app>bundle install unfortunately, fatal error has occurred. please see bundler troubleshooting documentation @ http://bit.ly/bundler-issues. thanks! c:/ruby193/lib/ruby/gems/1.9.1/bundler/gems/capistrano-cook-d0d4f904a443/capistr ano-cook.gemspec:17:in ``': no such file or directory - git ls-files (errno::eno in git bash console when running bundle install works fine. when requiring gem in capistrano deploy file not loaded. seems not installed after all. the bundler gem version 1.2.3 c:\rails\app>gem show capistrano-cook error: while executing gem ... (runtimeerror) unknown command show c:\rails\app>bundle show capistrano-cook c:/ruby193/lib/ruby/gems/1.9...

search - Combining TF-IDF (cosine similarity) with pagerank? -

search - Combining TF-IDF (cosine similarity) with pagerank? - given query have cosine score document. have documents pagerank. there standard way of combining two? i thinking of multiply them total_score = cosine-score * pagerank because if low on either pagerank or cosine-score, document not interesting. or preferable have weighted sum? total_score = weight1 * cosine-score + weight2 * pagerank is better? might have 0 cosine score, high pagerank, , page show among results. the weighted sum improve ranking rule. it helps break problem retrieval/ filtering step , ranking step. problem outlined weighted sum approach no longer holds. the process outlined in this paper sergey brin , lawrence page uses variant of vector/ cosine model retrieval , seems kind of weighted sum ranking weights determined user activity (see section 4.5.1). using approach document 0 cosine not pass retrieval/ filtering step , not considered ranking. search search-engine tf-id...

List with tuples in python -

List with tuples in python - i'm new python , have questions lists , tuples. i've got list consisting of tuples sentences , wordclass-tags. 1 element in list: [('it', 'pps'), ('says', 'vbz'), ('that', 'cs'), ('``', '``'), ('in', 'in'), ('the', 'at'), ('event', 'nn'), ('congress', 'np'), ('does', 'doz'), ('provide', 'vb'), ('this', 'dt'), ('increase', 'nn'), ('in', 'in'), ('federal', 'jj'), ('funds', 'nns'), ("''", "''"), (',', ','), ('the', 'at'), ('state', 'nn-tl'), ('board', 'nn-tl'), ('of', 'in-tl'), ('education', 'nn-tl'), ('should', 'md'), ('be', 'be'), ('directed...

Perl String Parsing to Hash -

Perl String Parsing to Hash - so lets had string. $my str = "hello how today. oh thats i'm glad happy. thats wonderful; thats fantastic." i want create hash table each key unique word , value number of times appears in string i.e., want automated process. my %words { "hello" => 1, "are" => 2, "thats" => 2, "thats" => 1 }; i brand new perl , have no clue how this, how handle punctuation etc. update: also, possible use split('.!?;',$mystring) not syntax, split @ . or ! or ? etc.. oh , ' ' (whitespace) one simple way split string on character not valid word-character in view. note no means exhaustive solution is. have taken limited set of characters. you can add together valid word-characters within brackets [ ... ] find border cases. might search http://search.cpan.org modules designed purpose. the regex [^ ... ] means match character not withi...

wildcard - Regular Expression for String *.java -

wildcard - Regular Expression for String *.java - i writing programme finding number of occurences of java classes in log file. i want count number of distinct times java class called. search should of form "*.java" can help me regular look this? a sufficient regular look [a-za-z_][a-za-z_0-9]*\\.java . regular look requires string start letter (or underscore), , go on number of letters or numbers (or underscores), follows java class name conventions. period double escaped \\ -- 1 escaping java escape \ in string, , sec regex matcher escape period (otherwise period special character meaning "any character"). this regular look fit task little improve asked precisely: .*\\.java (which .java preceded anything), because match entirety of line before ".java", leaving 'class names' "printing file myclass.java" instead of "myclass.java". i seek look out (and seek out changes it) on online tool rubular. ...

acs - Detect original relaying party application -

acs - Detect original relaying party application - i want authenticate user rp1 , rp2 applications against acs , custom sts provider. need know application rp1 or rp2 user came from. possible , how it? i think trivial without using acs how acs. in federation chain, sts theoretically aware of neighbors (in case, idp aware of acs) , hence can't this. officially supported way able register same physical sts 2 different logical identity providers in acs (e.g. http://myidp.com/rp1 , http://myidp.com/rp2). in practice, however, can way, though manner officially unsupported. next assumes you're using ws-federation custom idp, though can similar other protocols well. acs encodes info original request, including realm , reply addresses, encoded using base64urlencoding in wctx parameter of ws-federation response. can decode context in next manner: signinrequestmessage message = wsfederationmessage.createfromuri(request.url); byte[] bytes = httpserverutility.url...

ASP.NET Web Service SoapException When Client Built With MSBuild -

ASP.NET Web Service SoapException When Client Built With MSBuild - i have .net (2.0) windows forms application uses asp.net web service hosted part of .net (3.5) web site. web site hosted on windows server running iis7. when run forms application in visual studio (2010), able utilize web service without problem. however, when build forms application msbuild (4.0), builds , runs, when service used next exception thrown: system.web.services.protocols.soapexception: server unable read request. ---> system.invalidoperationexception: there error in xml document (the line number varies). ---> system.formatexception: input string not in right format. i used ms network monitor view soap see problem in xml document. appear @ to the lowest degree 1 tag isn't beingness parsed correctly. example, ms network monitor displays 1 of apparently broken tags follows: - element: xmlelement:<country> - usa</ - stag: <country> - tag: <country...

rest - WS02 HTTP header manipulation -

rest - WS02 HTTP header manipulation - i create simple ws02 facade offers restful endpoint , forwards sec restful (ie not soap) end point. need transform endpoint address add together version portion uri obtained http header of original request. how best this? you can using rest api functionality of wso2 esb. can find sample exposing rest backend service on different rest api resource available @ [1]. you can utilize rest_url_postfix property add together version portion dynamically endpoint url. next sample config of setting rest_url_postfix property. <property name="rest_url_postfix" expression="fn:concat('/version/',$trp:header_name_here)" scope="axis2"/> [1] http://docs.wso2.org/wiki/display/esb460/using+the+rest+api#usingtherestapi-exposingaback-endrestserviceusingadifferentapi rest header uri wso2 wso2esb

php - Fulltext search not working when searching the exact title -

php - Fulltext search not working when searching the exact title - i'm trying larn how utilize fulltext search mysql database. @ point i've created column search , query run, won't homecoming row though exact match content inside. my table: +-------------+ | id | title | +-------------+ | 1 | hamlet | +-------------+ and sql i'm using search. select * table match(title) against ('hamlet') limit 30; i ran query in phpmyadmin, , returned -mysql returned empty result set (i.e. 0 rows). ( query took 0.0012 sec ) the title there. there 1 row in database @ point. ideas why isn't working. it's new, i've been reading lot on it, think i'm doing right, i'm not. php mysql

php - Whats the difference between ? : and || -

php - Whats the difference between ? : and || - what difference there between using ?: conditional operator , || logical or . i finding code works with: $screenpixelratio = !empty($_cookie['screenpixelratio']) || $_cookie['screenpixelratio'] || $fallback_pixelratio; but not: $screenpixelratio = !empty($_cookie['screenpixelratio']) ? $_cookie['screenpixelratio'] : $fallback_pixelratio; could please explain why work one, not other. || binary operators operators deal 2 arguments as says check first if true not gonna check farther else check farther ?: ternary operator operator takes 3 arguments. arguments , result can of different types. expression1 ? expression2 : expression3; php

nhibernate - How to fetch entities where children match a certain condition in a many-to-many relationship? -

nhibernate - How to fetch entities where children match a certain condition in a many-to-many relationship? - i have used nhibernate quite time still struggle "simple" stuff. trying work many-to-many relationship between entity serviceprovider , features . basically every service_providers can have different features must nowadays in table features . these mapping files: serviceproviders.hbm.xml , <class name="app.domain.serviceprovider, app.domain" table="serviceproviders"> <id name="code" type="system.guid" unsaved-value="00000000-0000-0000-0000-000000000000"> <column name="serviceprovidercode" /> <generator class="guid.comb" /> </id> <property name="description" type="ansistring"> <column name="description" length="150" not-null="true" /> </property> ...

Hibernate delete not working -

Hibernate delete not working - while debugging server side code, came realize delete row not working. have copied code insert , replaced session.saveorupdate session.delete. right way delete object? doing wrong here ? i not getting exceptions. public void delete(object datastore) throws didnotsaverequestsomerandomerror { transaction txd; session session; session = currentsession(); //get first , fallback begin. if (session.gettransaction() != null && session.gettransaction().isactive()) { txd = session.gettransaction(); } else { txd = session.begintransaction(); } seek { session.delete(datastore); } grab (mappingexception e) { e.printstacktrace() ; } seek { txd.commit(); while (!txd.wascommitted()) ; } grab (constraintviolationexception e) { log.error("unable delete info " + datastore.getclass().tostring()); ...

c# - UI unable to update -

c# - UI unable to update - i've got resource-heavy method takes few seconds execute. have decided invoke within task display waiting icon while task carried out. what i've done called imgloading.visibility = visibility.visible before creating task, , creating task. 1 time task complete, phone call imgloading.visibility = visibility.collapsed; . for reason, image never collapses , stays visible indefinitely. unusual issue quite easy recreate. code i've got, , can't see i've done wrong: imgloading.visibility = visibility.visible; var validitytask = task.factory.startnew(() => expensivemethod(param1,param2)); validitytask.continuewith((previoustask) => { bool isvalid = validitytask.result; if (isvalid) { //do ui } else ...

c# - syntax error in insert into mdb -

c# - syntax error in insert into mdb - i write string insert mdb file in c#, error "syntax error in insert statment" catched in code. test string straight in microsoft access 2007 , query inserted no error. string qu = "insert reports ( docid, biopsy, normal, section, subsection, title, items, [text] ) values (21, false, false, 'recommendation', 'a', 'injection', 'a', 'a');"; oledbcommand cmd = new oledbcommand(); oledbdataadapter da = new oledbdataadapter(); dataset ds = new dataset(); oledbconnection con = model.getdataconnection(); cmd.connection = con; cmd.commandtext = qu; con.open(); seek { cmd.executenonquery(); } grab (exception ex) { system.windows.forms.messagebox.show("data error!\n" + ex.message); homecoming false; } the original string shows right bracketing, prior unfortunate edit. string qu = "insert reports ( docid, biopsy, normal, [section], subsection, title,...

css - footer on the baseline -

css - footer on the baseline - i cannot figure out why black bar on footer doesn't goes on baseline of window. don't want "fixed" while scrolling. on absolute bottom html { -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; position: relative; } body { padding-top: 15px; /* 60px create container go way bottom of topbar */ background: #f7f7f7 repeat-x url(<%=image_path('background.png')%>) top left; font-family: helvetica, arial, sans-serif; color: #323232; } footer{ margin: 0px; padding: 10px; background: black; color: white; position: absolute; left:0; right: 0; bottom: 0; } there's very solid solution mutual problem utilize when want footer 'sticky'. css css3 zurb-foundation

Real Introduction to Apache Karaf -

Real Introduction to Apache Karaf - we looking utilize karaf, introduction/quick start (main karaf website) has nil deploying apps container - know, amazing yet true. know of useful introduction new karaf? thanks. i guess looked @ wrong places the, cause user , developer dokumentation tells you either deploy artefacts either dropping in deploy folder, installing osgi:install url, adding/installing features , forth. recommend rtfm, it's there. in case still didn't find looking inquire users mailing-list. at site you'll find karaf online documentation apache-karaf

JDBC throwing java.lang.NullPointerException -

JDBC throwing java.lang.NullPointerException - i not sure why error occuring column has data's in , able execute statement using toad seek { system.out.println("executing sql"); string r = "select id pa_str_rtl"; system.out.println("starting executing sql"); st = con.createstatement(); resultset rs = st.executequery(r); while(rs.next()) { int r1 = rs.getint("id"); system.out.println(r1); } } catch(sqlexception e) { e.printstacktrace(); } as suspected, connection null. means problem isn't in of code posted. before when connection. typically means have try/catch around creating connection , ignoring error. mutual errors not having database driver jar in classpath (class not found) or not having valid connection string. jdbc

java - Action event on a JButton matrix -

java - Action event on a JButton matrix - i can't handle event in matrix of jbuttons. need figure out button pressed, alter objects color match button. i using code: private class matrixbuttonlistener implements actionlistener { public void actionperformed(actionevent e) { jbutton btn = (jbutton) (e.getsource()); (int = 0; < matrixbouton.length; i++) { (int j = 0; j < matrixbouton[i].length; j++) { btn.equals(matrixbouton[i][j]); if (btn.getbackground() == color_neutral) { btn.setbackground(color_player); } } } } } instead of looping through jbuttons trace button using evt.getsource() . homecoming reference actual button pressed. , can perform wish. can utilize next simplified code indeed: private class matrixbuttonlistener implements actionlistener { public void actionperformed(actio...

Rails: devise Tut -

Rails: devise Tut - i tried this: http://blog.blazingcloud.net/2011/01/08/devise-authentication-in-rails-3/ whre added depedencies shown? //sorry changed question, after answered! sorry this. bundler manage gem dependencies. when add together devise gemfile , run bundle install, installs run time dependencies well. devise gem depends upon bcrypt-ruby,warden. this link provides details dependencies of devise gem. ruby-on-rails

ios - Naming selector with string -

ios - Naming selector with string - this question has reply here: how selector name? 2 answers i have made button programatically , i'm adding action button this: [button1 addtarget:self action:@selector(button1) forcontrolevents:uicontroleventtouchupinside]; but want name selector string format.. have tried this: [b4 addtarget:self action:@selector([nsstring stringwithformat@"button%i", i]) forcontrolevents:uicontroleventtouchupinside]; of course of study doesn't work, there similar can create work? if understand problem.. this work: nsstring *selname = [nsstring stringwithformat@"button%i", i]; sel selector = nsselectorfromstring(selname); [button1 addtarget:self action:selector forcontrolevents:uicontroleventtouchupinside]; but must inquire why wish this. trying handle several buttons? can done single selector ...

debugging - Debug Memory Overwrite in MSVC -

debugging - Debug Memory Overwrite in MSVC - i using msvc seek figure out memory overwritten. utilize info breakpoint in msvc memory address. stops when memory changes , see hex values beingness changed , low level code in windows (pop off list etc). my question how msvc stop when memory changed instead of showing me memory hex values show me line of c code causing this? thanks in advance. there's no direct answer. when programme suspended, can see phone call stack of each thread of program, , analyse it. see show threads window: debug->windows->threads . chose thread double clicking , window phone call stack ( debug->windows->call stack ) analyse uppermost functions in list. debugging visual-c++ memory breakpoints

c# - Data Serialization on Custom DataSourceControl -

c# - Data Serialization on Custom DataSourceControl - i writing custom datasourcecontrol have select capability working normal objectdatasource , typename , selectmethod properties. the info coming typename class saved in files indexed hash of parameter values , contextname. meaning that, everytime gridview requests datasource , same parameter values given, command find corresponding file , load info there. in fact, every different combination of parameter values generate new file data. this functionality helpful in cases have when info takes long processed , retrieved database , doesn't need live user (its lastly day). the main difficulty i'm having serialize info coming selectmethod. thing know homecoming type instance of ienumerable . i'm using xmlserializer saving , retrieving info content file, when trying serialize gives me error cannot serialize interface . this basic code executes selectmethod , serialization part: //gets select type...

php - selecting a new row daily in mysql -

php - selecting a new row daily in mysql - i have mysql database in there table counselor want loop through records 1 1 each day. means selecting 1 record today,next record tomorrow , on until records selected , 1 time again same procedure start. there can no. of records in database. how can ? using php. cron job you can go fro cron job kind of stuff. create php file has code datas db current particular day. run cron job daily @ particular time. (i.e) set time daily cron job run. run automatically , daily record. php mysql

sql server - BreezeJs/EntityFramework Order By null/empty string handling -

sql server - BreezeJs/EntityFramework Order By null/empty string handling - i have application making utilize of breezejs querying standard webapi controller backed entityframework , sql store. when utilize order clause, wish null , empty string values sorted lastly (for both ascending , descending order). in sql or ef server side not hard task. however, i've not been able locate documentation breezejs shows how can accomplished. the ideal solution way modify ef context default behavior when order detected, prior query hitting db. failing that, perhaps there's way i've missed in breeze specify how nulls handled in results. worst case, i'll need write 2 separate queries client side , merge results, 1 , 1 without values in specified column. suggestions? this interesting question. breeze has class called localquerycomparisonoptions may used command whether client side ordering case sensitive , whether string comparisons should sql92 compliant. ...