Posts

Showing posts from June, 2013

django - Post a form with urllib and move to that page like a web browser -

i want post form manually using urllib , redirect user page if had clicked submit button in web browser. the reason i'm doing because before submitting payment paypal, need store information db. want handle user paypal website without having him click again in "buy now" button. i'm using django, if matters somehow. is possible? thanks this tool might you: http://wwwsearch.sourceforge.net/mechanize/

Vim plugins, tips and tricks for Drupal development -

i looking usefull scripts, vim configurations , addons drupal development vim. i interested in experiences various scripts, personal favorites , on. drupal-vim vimrc configuring vim on drupal.org from useful vim plugins web development , design (php, html, css, javascript)? surround.vim enclose text in html tags jslint.vim check javascript errors , bad practices jslint jshint.vim check javascript errors , bad practices jshint (less brutal jslint) http://www.vim.org/scripts/script.php?script_id=1623 automatic folding of php syntastic automatic syntax checking of e.g. php exuberant ctags tagging of wide array of languages. taglist helps view/navigate source, displays call signature in status area. snipmate snipmate drupal texmate bundle . t-command kicks ass , not drupal development. love it. see video. https://wincent.com/products/command-t

Which is the shortest way to silently ignore a Ruby exception -

i'm looking this: raise exception rescue nil but shortest way i've found this: begin raise exception rescue exception end def ignore_exception begin yield rescue exception end end now write code ignore_exception { puts "ignoring exception"; raise exception; puts "this ignored" }

tabs - Eclipse: how to switch between console window and editor? -

i'm using eclipse python , r development. how can jump between editor tab , console window using keyboard shortcut / hotkey? go view console: shift + alt + q + c you can switch editor using ctrl + f7 . ctrl + shift + l displays shortcuts in eclipse.

php - im trying to change an image using GD library but its not working? -

<?php header('content-type:image/jpeg'); $image = imagecreatefromjpeg('suliduli.jpg'); //alpha channel parameter omitted below optional. imagefilter($image, img_filter_colorize, 50, 0, 0); imagejpeg($image, '', 90); imagedestroy($image); ?> i know have gd installed checked using php info! , file suliduli.jpg thier aswell, thier problem im not seeing thanks! :)) edit: when remove header: ÿØÿà�jfif������ÿþ�;creator: gd-jpeg v1.0 (using ijg jpeg v62), quality = 90 ÿÛ�c� ÿÛ�c ÿÀ�)³"�ÿÄ����������� ÿÄ�µ���}�!1aqa"q2‘¡#b±ÁrÑð$3br‚ %&'()*456789:cdefghijstuvwxyzcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ�������� ÿÄ�µ��w�!1aqaq"2b‘¡±Á #3rðbrÑ $4á%ñ&'()*56789:cdefghijstuvwxyzcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ���?�ûŽŽ}èïkíÖ¿ ?p¤Á§šbÜÔÜbÒsnÇ ü´Ä5ºsw§nÇjf<硨°ÐšsžÝ)¬{àÑŸcha‘Ò“¾i„sf{Ò´œŠ@cpf9Í`íÚ€Ô)�Í_b‰jj5¥4œš›ˆxmÝ;rŽ

UNC path to File URI -

how convert unc path file uri.. application user give css unc path in test box : \\egng4573\d$\css\style.css how can change : file:///d:/css/style.css so firefox , ie both can access css desired path , apply on them.. please tell.... in .net, let unc = @"\\egng4573\d$\css\style.css" then new system.uri(unc) should it. val : system.uri = file://egng4573/d$/css/style.css

mysql - Grab a certain amount of database entries from a table -

is there way grab exact amount of entries database example. example had table had id , total visits columns. wanted grab 20 entries , sort them total visits. how go this? know how sort whole table, able grab top twenty total visits , sort them. thanks o , right using sqlite, know in future using mysql also. thanks try with: select * tablename order totalvisits limit 20

oracle11g - Determine Oracle Warehouse Builder version -

is there way check whether server running 11g release 2 or 11g release 1 version of oracle warehouse builder? also safe assume release 11.1.0.7.0 in terms of oracle instance (as opposed owb) instance of 11g release 1 ? select * v$version; returns oracle database 11g enterprise edition release 11.1.0.7.0 - 64bit production pl/sql release 11.1.0.7.0 - production core 11.1.0.7.0 production tns solaris: version 11.1.0.7.0 - production nlsrtl version 11.1.0.7.0 - production "also safe assume release 11.1.0.7.0 in terms of oracle instance (as opposed owb) instance of 11g release 1?" yes. to version of owb, try... select release all_iv_installations; (i can't test haven't got owb installed.) ref: http://download.oracle.com/docs/cd/e10926_01/doc/owb.101/b12146/d_pub.htm given owb schema installed database, seems that's version of owb you'll have, unless think it's been upgraded seperately. it seems possible install

stackexchange api - How to get badges for a user with Stacky? -

i'm using stacky api version 1.1. such awesome api i'm not sure how users badges. there method gettagsbyuser not associated getbadgesbyuser . there i'm missing or not part of api yet? the method getuserbadges . ienumerable<badge> getuserbadges(int userid) i guess called getbadgesbyuser or else. open feedback library. thanks!

javascript - Microsoft styled tabs -

recently asked question on stackoverflow multiline tabs. below link multi-line tabs i wondering if possible make them windows styled tabs, if tab in first line selected, want push second line. problem have creating dynamic tabs. possible using javascript/jquery, calculate widths of each tab , determine @ point second line of tabs started? thanks updated added tab auto-resize. tested on chrome / ff demo & source: http://ask.altervista.org/demo/microsoft-styled-tabs/ $(function() { setlines(); $('#windows-properties li a').click(function(e) { e.preventdefault(); var $li = $(this).parent(); $(this.hash).show().siblings('.property-content').hide(); var litp = parseint($li.position().top); if (litp < lastlipos) { $('li.line-' + litp).wrapall('<div id="move-lis"></div>'); $('#move-li

android - How Do I change the indicator of a tabhost dynmaicly from an other activity -

i have tabhost contains 5 tab (monday .... friday). want change indicators dynamically other activities (using button) 1 have solution in advance get hold of tabindicator view. consists of imageview , textview unless have own custom tabindicator. viewgroup tabinidcator = tabhost.gettabwidget().getchildtabviewat('the index of tab want change') the textview inside relative layout 2nd child (careful might change) unless have custom tabindicator view. textview tabindicator = (textview) tabindicator.getchildat(1); indicator.settext("thunday"); if want change image imageview @ location 0

lua metatable registration from c question -

hello have following bit of code seems work, i'm not sure why - i've built testclass follows class testclass { int ivalue; public: int getivalue(); void setivalue(int &v); }; and registered testclass (bits left out actual functions they're pretty basic). it's registration of metatables i'm not following. (etivalue , setivalue c functions call class functions of same name) static const struct lual_reg arraylib_f [] = { {"new", new_testclass}, {null, null} }; static const struct lual_reg arraylib_m [] = { {"set", setivalue}, {"get", getivalue}, {null, null} }; int luaopen_testclass (lua_state *l) { lual_newmetatable(l, "luabook.testclass"); lua_pushvalue(l, -1); /* duplicates metatable */ lua_setfield(l, -2, "__index"); lual_register(l, null, arraylib_m); lual_register(l, "testclass", arraylib_f); return 1; } the bit don't understan

jQuery rotating through list items in a gallery, how to do this with muliple images on a page -

hi have tried above here http://www.jsfiddle.net/b3lf5/1/ trouble can not work on homepage. have work multiple images rotating @ different times (would weird if rotated @ same time), possible. appriciated, thank in advance. the trick here make code work objects specified class instead of id. way, can have many of slideshows want. need keep array containing variables each slideshow. fully working sample multiple "slideshows" staggered transition time. live demo http://jsfiddle.net/b3lf5/7/ html <div class="gallery"> <ul class="gallery-container"> <li><img src="http://placehold.it/250/ccc" alt=" "></li> <li><img src="http://placehold.it/250/aaa" alt=" "></li> <li><img src="http://placehold.it/250/888" alt=" "></li> <li><img src="http://placehold.it/250/444"

c# - How can I get object instance from ()=>foo.Title expression -

i have simple class property class foo { string title { get; set; } } i trying simplify data binding calling function like bindtotext(titletextbox, ()=>foo.title ); which declared like void bindtotext<t>(control control, expression<func<t>> property) { var mex = property.body memberexpression; string name = mex.member.name; control.databindings.add("text", ??? , name); } so put in ??? instance of foo class. how refernce calling foo instance lambda expression? edit: instance should there somewhere because can call property.compile() , create delegate uses foo instance inside bindtotext function. question if can done without adding reference instance in function parameters. call upon occum's razor yield simplest solution. edit 2: many have failed notice closure exists in accessing instance of foo inside function, if compile lambda. how come compiler knows find instance, , don't? insist there has ans

asp.net mvc - Having issue with multiple controllers of the same name in my project -

i running following error asp.net mvc 3 project: multiple types found match controller named 'home'. can happen if route services request ('home/{action}/{id}') not specify namespaces search controller matches request. if case, register route calling overload of 'maproute' method takes 'namespaces' parameter. the request 'home' has found following matching controllers: mycompany.myproject.webmvc.controllers.homecontroller mycompany.myproject.webmvc.areas.company.controllers.homecontroller i have homecontroller in default controller folder, class name of mycompany.myproject.webmvc.controllers.homecontroller. my registerroutes method, in global.asax, looks like: public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.maproute( "default", // route name "{controller}/{act

Can I host asp.net website? -

if develop website in asp.net using visual studio trial version & have existing domain supports asp.net hosting. need purchase license copy of .net framework or visual studio in order lunch website? nope. have need launch site. the .net runtime doesn't require purchase anything. if hosting provider has installed on server , offers asp.net hosting...you're go on front. the trial version of visual studio doesn't limit in sense. could've written asp.net code notepad , compiled .net sdk microsoft distributes freely. it's same when gets served up.

excel - How to compare 2 complex spreadsheets running in parallel for consistency with each other? -

i working on converting large number of spreadsheets use new 3rd party data access library (converting third party library #1 third party library #2). fyi: call udf (user defined function) placed in cell, , when refreshed, pulls data pivot table below formula. both libraries behave same , produce same output, except, small irregularites can arise, such additional field being shown in output pivot table using library #2, can affect formulas on sheet if data being read pivot table without using getpivotdata. so have ~100 of these complicated (20+ worksheets per workbook) spreadsheets have convert, , run in parallel period of time, see if output using new data access library matches old library. is there clever approach this, don't have spend large amount of time analyzing each sheet determine specific elements compare? two rough ideas come mind: 1. create validator workbook has same # of worksheets, , worbook1!worksheet1!a1 - worbook2!worksheet3!a1 every possible cell on

c# dll encryption -

i need encrypt c# code used by asp.net pages. so, when compile create dll file need encrypt dll file. please me how encrypt dll file... one thing may able embed encrypted .dll .dll decrypted , loaded @ runtime. first, compile .dll code want protect. second, encrypt .dll in whatever manner see fit. then, create second .dll have encrypted .dll embedded resource. have second, outer, .dll ask key @ runtime. the outer .dll decrypt encrypted .dll key. the outer .dll can call system.appdomain.currentdomain static method, , load decrypted .dll using load method. the outer .dll may have inter-op between asp.net , decrypted .dll. there limitations tis method. need provide instance key each time @ startup things running. there ways intercept this. also, decrypted .dll exist in memory, decrypted, once key has been provided. there ways read this. this method useful protect code form might steal hard disk drive. not absolute barrier in control of machine running code.

Cross domain access to iframe using window.name -

i implemented script monitors iframe name understood ok various sources on net. seems must have gotten wrong - error: permission denied access property 'name' source file: http://plungjan.name/test/testwindowname.html line: 16 please visit http://plungjan.name/test/testwindowname.html i prefer fix script , not use jquery or dojo or other framework. thanks as remember must change iframe location "about:blank" , after can access window.name property

java - Analyzing memory with MAT - question about UTF characters -

Image
i .hprof file , i'm analyzing eclipse memory analyser (mat). i run top component report and, in duplicate strings section, mat detects string instances identical content. i'm working string.intern() , other homework me, not question. report shows me duplicated strings these: \u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000.... \u000a\u0009\u0009 \u000a\u0009\u0009\u0009\u0009 , on. other strings readable, but, how these ones? i'm thinking xml parsing (i use jibx in app). my questions are: what think these strings coming? how can analyse them better? if xml parsing or else, how can clean/clear them after parsing? maybe jibx 1.0.1 release old these issues? any suggestion these utf-8 like strings appreciated. in advance. you can right-click on suspicious string , select list objects/with incoming references. show objects reference strings.

Concatenate with escaped chars in xslt? -

i'm writing xslt code concatenates string: <xsl:attribute name='src'> <xsl:value-of select="concat('url(&apos;', $imgsrc, '&apos;)')" /> </xsl:attribute> for reason can't use it, keep getting error: unknown function - name , number of arguments not match function signature in static context - 'http://www.w3.org/2005/xpath-functions:concat' while evaluating expression: select="concat('url(&apos;', $imgsrc, '&apos;)')" any idea? thx ==================== edit i'm trying get: url('some_path') was having trouble apostrophes, doesn't work. the &apos; references resolved xml parser parses xslt. xslt processor never sees them. xslt processor sees is: concat('url('', $imgsrc, '')') which not valid because commas don't end in right place separate arguments. however, might work you, depending on s

Php Class for manipulate text on image with GD -

i looking class can manipulate image gd center text, add border text, choose font... use class http://www.phpclasses.org/package/6055-php-draw-images-defined-with-css-like-properties.html this class can render graphics in image. uses css-like syntax define values of parameters , options describe each type of graphic primitive class can draw in image.

load csv file content into mysql table with validation -

i want import large csv file (about 12mo) mysql table , first tried load data infile work , in case want firstly test csv rows determine if want update data or insert new records solution read file , compare content of each row data in table , , make right action methode works takes lot of time , resources now question 1 : can use import functions of phpmyadmin ( open source ) , project comercial 2 : if yes can , know tutorials ( idea ) 3 : if no can't , there such commercial frameworks exporting/importing thanks this pretty common sql: either want insert or update, yes? need 2 statements (one update, 1 insert) , way tell if should inserted. need unique key never duplicated individual record (can composite key) , 2 statements, this: update right set right1 = left1, right2 = left2, etc the_import_table right left join the_existing_data left on left.key = right.key right.key not null --note write in tsql insert right ( right1, right2,

wpf - DataGridTextColumn not updating properly with ValidatesOnDataErrors = True -

i have problem wpf control datagrid , datagridtextcolumn. when binding set include validatesondataerrors = true, first input user replaced null after having been commited. xaml: <datagrid itemssource="{binding}" autogeneratecolumns="false"> <datagrid.columns> <datagridtextcolumn header="description" binding="{binding description, updatesourcetrigger=propertychanged, mode=twoway, validatesondataerrors=true}"/> </datagrid.columns> </datagrid> datacontext set in code-behind: this.datacontext = new list<viewmodel>() { new viewmodel() { description = null }, new viewmodel() { description = "kalle" }, new viewmodel() { description = "olle" } }; } public class viewmodel : idataerrorinfo { public string description { get; set; } public string error { { return null; } } public string this[string columnname] {

architecture - What is the usage of Model in MVC? Is it actually useful? -

i'm new in this, bear me. i've been using 1 mvc framework in couple of projects lately, , after while, i'm disillusioned in perceived usefulness of 'model' in mvc. i usefulness of controllers , views, know separation between presentation , logic important make code more maintainable in future, although not faster or more robust. if logic should placed inside controller in first place, don't see use model, active-record. have language robust , easy use communicate database, right? it's called sql. me when models implemented active-record, it's usefulness depends on whether or not want app fit in multiple databases. so i'm asking is, if you're using 1 database, why bother models , active-records? why don't use sql? why layer of complexity? guys have case studies/real-life stories models can things better using database class , sql-away? again, i'm sorry if seem ignorant, don't know why models important. answering. f

jquery - Animating an element to it's current position moves it somewhere else -

i have following self-contained test page: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>drag tests</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js" type="text/javascript"></script> <style type="text/css"> #leftcolumn { float: left; width: 200px; border-right: 1px solid gray; background-color: #eee; } #mainarea { float: left; width: 600px; background-color: #bbb; } .draggable { width:

javascript - option to change jquery ui datepicker to just a "yearpicker" -

i'm checking datapicker documentation here trying find way change full display date picker can pick year only. can't find anything. tried suggestions found here this, still displays full view. .datepicker({changeday:false, changemonth:false, changeyear:true}) can somehow turn datapicker year picker only? for company's website, used jquery ui slider instead since year single value. in our implementation, had year range, slider accommodated that. http://jqueryui.com/demos/slider/#steps

latex - Spacing issues with xspace -

let's macro \newcommand{\k}{king\xspace} . spacings in "... said \k." fine. do if want no spacing in middle of \k\k.? want "kingking." not "king king." is there way this? the whole point of \xspace add space between words , not add space before punctuation. so, if don't want spaces between 2 uses of macro don't use \xspace . but, of course require you use {} @ end: \documentclass{article} \newcommand{\k}{king}% \begin{document} @ end of sentence \k.\par in between \k\k{} want 1 long word. \end{document}

wpf - MVVM, two synchronized Grid Data -

Image
i want control adding , removing items 2 list (selected , unselected), this: but can't find way this; how can use griddata (or similar control gridcontrol of devexpress) binding 2 list , modify it? problems: i can't use observablecollection control i can't bind selecteditems if have suggestion or sample work, great help can use 2 observable collections? 1 selected , 1 unselected. seems easiest way implement such functionality. public class mainviewmodel { private readonly observablecollection<item> _selecteditems = new observablecollection(); private readonly observablecollection<item> _unselecteditems = new observablecollection(); public ienumerable<item> selecteditems { { return _selecteditems; } } public ienumerable<item> unselecteditems { { return _unselecteditems; } } private void unselectitems() { movefromonecollectiontoanother(_unselecteditems, _selecteditems, ...); } pri

mysql get data from one table to another, while grouping records and extra fields -

ok, explain first have, , need result. basicly, have phonebook, phonebook has duplicate records "company" while duplicate records not duplicate... :\ i think example explain better: demo records: 1. company a, address a, phone 2. company a, address a, phone b 3. company a, address a, phone c 4. company a, address b, phone what want, make new table, filled "company a", "address a" phone numbers 1 records, result should like: company a, address a, phone a, phone b, phone c etc.. the second problem "company a" can bit diffrent, example: 1. company xyz, address a, phone 2. company abc, address a, phone i dont know how start this. thinking of doing coding c# application, think there might easier solution using pure mysql. your way not maintain normalization, however, following might looking for create new table: create table new_table ( company_a varchar(255), address_a varchar(255), phone_a varchar(255), p

java - Trying to recieve a string through a broadcast in an activity from a service, not seeing anything -

here's code below. first bit of code activity. put click listener on button in activity starts service. right now, want see can recieve strings service here code trying that. put "hello world" broadcast in oncreate of service test. can spot issue? service code below activity code. package homebrewchatter.calcs; import android.app.activity; import android.content.broadcastreceiver; import android.content.context; import android.content.intent; import android.content.intentfilter; import android.content.sharedpreferences; import android.os.bundle; import android.util.log; import android.view.view; import android.view.view.onclicklistener; import android.widget.textview; import android.widget.edittext; import android.widget.button; import java.util.list; public class hop_timer extends activity { private textview timerout; private broadcastreceiver onbroadcast = new broadcastreceiver() { @override public void onreceive(context

Pro Android 2: What are getTextView() and registerMenu()? -

listing 3-33 in acclaimed pro android 2 book (source code can found here ) references 2 functions of definitions haven't been able find in either android sdk or all listings in book itself: gettextview() registermenu() what these functions , can found? public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); textview tv = new textview(this); tv.settext("helloe, android. hello"); setcontentview(tv); registerforcontextmenu(tv); } will fix problem of methods not existing. and no book have read on android without typos, missing bits etc. ps. menu menu shows when press down on 'textview'.

comparison - Algorithm for Rating Objects Based on Amount of Votes and 5 Star Rating -

i'm creating site whereby people can rate object of choice allotting star rating (say 5 star rating). objects arranged in series of tags , categories eg. electronics>graphics cards>pci express>... or maintenance>contractor>plumber. if user searches specific category or tag, hits must return highest "rated" object in category. however, system flawed if 1 person votes 5 stars object whilst 1000 users vote average of 4.5 stars object. obviously, logic dictates credibility given 1000 user rated object opposed object evaluated 1 user though has "lower" score. conversely, it's reliable trust object 500 user rating score of 4.8 trust object 1000 user ratings of 4.5 example. what algorithm can achieve weighting? a great answer question here: http://www.evanmiller.org/how-not-to-sort-by-average-rating.html

webforms - email in asp.net -

possible duplicate: sending email contact form asp.net how send email asp.net page using c# forget password, password automatically emailed alternate id. need how possible send email asp.net page using c#. you use smtpclient class send email in .net application.

sql server - Finding T-SQL code with literal strings for localization project -

does have experience tools/techniques identify t-sql code literal strings (that may require language translation localization project)? love leverage another's experience may save me time developing own tool or - god forbid - doing manually. just idea, this: select object_name(id), [text] syscomments id in ( select id syscomments [text] '%''%''%' , objectproperty(id, 'isprocedure') = 1 group id ) that show every procedure constant string literal in it. of course, if use many dynamic sql execution statements, you'll lot of false positives... hope helps.

'base' as a function parameter name in C# -

i following microsoft's naming guidelines, , using camelcase in function parameter naming. suppose use signature public string writenumberinbase (int number, int base) in method , compiler complaining parameter name because 'base' reserved keyword... there way can 'base' accepted parameter name? try this: public string writenumberinbase (int number, int @base) // ^ // @ sign used "escape" keywords (as side note, in vb.net same putting keyword or reserved word in square brackets, e.g. [mybase] .) or alternatively, call parameter radix instead of base .

datetime - javascript printer friendly form with date problem -

beneath see piece of custom code zendesk. works fine, till want implement date/time snippet. normally script works this: 1 - there button says "print ticket". 2 - button has onclick event open printer friendly page ready printing. after implementing date/time code (what didn't believe) blanc page date , time. the thing happends date , time shown without rest of printable form. i think have call date/time javascript in other way, don't know how. can please me this? <style> input.createtable { display:none; } </style> <script language="javascript"> <!-- writeconsole = function(content) { top.consoleref=window.open('','myconsole', 'width=800,height=800' +',menubar=0' +',toolbar=0' +',status=0' +',scrollbars=1' +',resizable=1') // top.consoleref.document.open("text/html","replace"); top.consoleref.document.writeln( &

java - Problem configuring my first Stripes project -

apparently i'm having technical problem configuring stripes. i use eclipse ganymede , when try run project main project or jsp 404 error tomcat. this structure of project: web-content>web-inf>lib>....jstl, commons.logging , stripes jars web-content>web-inf>classes>stripesresources.properties web-content>web-inf>classes>stripesbook>action>stripestime.java (extends actionbean) web-content>web-inf>jsp>stripestime.jsp web-content>web-inf>lib>web.xml....which looks follows: web.xml: stripes <filter> <filter-name>stripes filter</filter-name> <filter-class>net.sourceforge.stripes.controller.stripesfilter</filter-class> <init-param> <param-name>actionresolver.packages</param-name> <param-value>stripesbook.action</param-value> </init-param> </filter> <servlet>

python - What is the best way to build a database from a MS Word document? -

please advise me on how approach problem: i have sequential list of metadata in document in ms word. basic idea create python algorithm iterate on information, retrieving name of process, when made queue, database. example metadata: process: process walker (1965) exact reference: walker process equipment., inc. v. food machinery corp. link: http://caselaw.lp.findlaw.com/scripts/getcase.pl?court=us&vol=382&invol= type of procedure: certiorari united states court of appeals seventh circuit. parties: walker process equipment, inc. sector: systems ... start date: october 12-13 arguedas, 1965 summary: food machinery company has initiated process stop or slow entry of competitors through use of patent obtained fraud. case concerned patent on "knee action swing diffusers" used in aeration equipment sewage treatment systems, , question whether "the maintenance , enforcement of patent obtained fraud before patent office&q

c# - ASP.net Forms Authentication - Protection not working for me -

in web.config file i've got following: <authentication mode="forms"> <forms name=".aspxauth" protection="all" loginurl="~/account/login.aspx" timeout="2880" /> </authentication> but when log in , watch traffic fiddler, still can see password in plain text. have no idea whats wrong. regards, matt i know of 2 solutions this: use https. best solution, moste secure. use javascript library (sha1) hash password before sending (and clear original password field!). use randomly generated salt different every login, store salt on server , in hidden field, can check salt (user may not change it).

django haystack - Sharing Whoosh index -

i'm implementing cms site in django, , i'd add full-text content search. site reasonably small , generate low search traffic, think whoosh reasonable production solution. my current understanding whoosh indexing , result generation happens in application process, rather requiring own daemon, great. however, i'm bit worried concurrent access index. can single whoosh index support reads (and potentially writes) multiple, uncoordinated processes? example, problematic if same index shared load-balanced django application servers, either in terms of serious performance degradation or index corruption? thanks in advance advice. it appears, based on whoosh documentation, possible share index between several threads/processes. docs on indexing here: http://packages.python.org/whoosh/indexing.html#indexing-documents indicate index locked writes when updating it, i'd imagine highly read-heavy application ok.

ruby on rails - Page title variable, can I fetch from file also? -

in main layout page, have this: <title> title_from_config || @page_title </title> basically if page_title variable wasn't set, use default page title. i want default page title config file or something, suggest use this? this rails 3. you can add initializer file (config/initializers/constants.rb) contains config options application. make sure use ruby constants here they're available in top-level namespace of application.

mysql - Help writing where portion of query in codeigniter -

i have query written using codeigniters active record class. when query written looks like where `account` = 1 , cgl.contactid null , `firstname` 'm%' or `lastname` 'm%' but need like where `account` = 1 , cgl.contactid null , (`firstname` 'm%' or `lastname` 'm%') //notice brackets how can this? $this->where(array('account' => 1, 'cgl.contactid' => null); $this->where(("firstname` 'm%' or `lastname` 'm%'"))

ruby - How to get the name of the calling method? -

is there way in ruby find calling method name inside of method? for example: class test def self.foo fooz.bar end end class fooz def self.bar # test.foo or foo end end puts caller[0] or perhaps... puts caller[0][/`.*'/][1..-2]

java - android: Custom Submenus -

i want create customized submenu can add "about page" application. submenu text view bunch of info. im defining menu in xml. or links great, thanks!!! <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/settings_menu" android:title="settings" /> <item android:id="@+id/about_menu" android:title="about"> <menu> <item android:id="@+id/about_submenu" android:title="tip message" /> </menu> </item> <item android:id="@+id/quit_menu" android:title="quit" /> </menu> also out of curiosity, how define more complex custom submenu, 1 takes user input keyboard. i think it's easier make menu. try activity @android:drawable/menu_submenu_background background example.

Fetch the first youtube video via json jquery and display it as a teaser -

i have need pull out first video teaser display code below: $.getjson('http://gdata.youtube.com/feeds/api/videos?q=love&alt=json-in-script&callback=?&max-results=3&start-index=1', function(data) { $.each(data.feed.entry, function(i, item) { var title = item['title']['$t']; var video = item['id']['$t']; // need variable store first video id array here manipulated via php later //var videoid1 = ?; video = video.replace('http://gdata.youtube.com/feeds/api/videos/','http://www.youtube.com/watch?v='); //replacement of link videoid = video.replace('http://www.youtube.com/watch?v=',''); // removing link , getting video id $('#videonavs .navs').append('<li><a href="'+video+'"> '+title+' -'+videoid+ '</a></li>'); // }); }); and html: <div id="videos"> <object w

Flex XML descendents -

i have complex xml structure want descendents uisng xml paren.child.@attribute representation for example <employes> <employe id="a123"> <month name="jan" sales="100" target="110"> <task sale="100" target="110"/> </month> <month name="feb" sales="150" target="150"> <task sale="75" target="75"/> <task sale="75" target="75"/> </month> </employe> <employe id="b123"> <month name="dec" sales="50" target="100"> <task sale="50" target="100"/> </month> <month name="jan" sales="100" target="110"> <task sale="100" target="110"/> </month> <month name="feb" sale

Is there any plugin in wordpress which work like sobi2 in joomla? -

is there plugin in wordpress work sobi2 in joomla,like show listing,then click on particular list detail page display of list. hope 1 me. in advance you need cck, there 2 know of - flutter - http://wordpress.org/extend/plugins/fresh-page/ pods - http://wordpress.org/extend/plugins/pods/ either 1 should work simple listing.

GWT 2.2.0 and 3rd party MVP frameworks -

gwt 2.2.0 brings radical changes in gwt: activities, places. many frameworks gwt-mvp, etc. work on older features of gwt rpc, mvp, etc. are these third party frameworks deprecated? there frameworks emerged since gwt 2.2.0? thanks. the third party frameworks not automatically deprecated because google duplicated functionality, prefer features built right gwt external libraries. gwt team has shown dedication , reliability product i've come trust - , don't have time build trust 3rd parties if don't have to! that said, there still rough edges features gwt has released, , 3rd-party frameworks may more mature gwt counterparts. feeling that, things i'm learning scratch, might learn gwt things. libraries i've been using long time (gwt-log, gwt-dnd), if google builds straight gwt, need pretty compelling features me switch momentum.

parsing a String in PHP -

i got string in following format: a:5:{s:21:"securimage_code_value";s:4:"4l7z";s:6:"userid";s:2:"25";s:8:"username";s:6:"lupoxy";s:10:"angemeldet";s:4:"true";s:9:"user_role";s:3:"111";} i need parse entries within quotes, , array this: $testarray[0]['key'] = "securimage_code_value"; $testarray[0]['value'] = "417z"; $testarray[1]['key'] = "userid"; $testarray[1]['value'] = "25"; and on... no i'm not trying hack sessions ;) i'm using uploadify codeigniter, , need verify, user allowed upload, based on session. cannot use codeigniter session functions, since uploadify creates own session upload-php-script. pass session_id uploadify scriptdata, , session_id in ci_sessions table, parse required session userdata myself. maybe knows better solution well? ;) $params = unserialize($string); $

c# - Static Methods and Multi-Threading -

can there problems in having static class static methods (no properties, fields or else) , having several threads accessing methods @ same time? as long there no shared state or external resources , then: no risk whatsoever. you've mentioned "no fields" etc, - long aren't indirectly talking shared state (perhaps via common argument isn't thread-safe in scenario, or via other utility methods calls, share state in messy ways), should fine.

entity framework - how to have multiple FK in the same table/class with EF4 Code first -

i have these 2 tables: create table countries ( int id identity primary key, name nvarchar(20) ) create table persons ( int id identity primary key, country1 int references countries(id), country2 int references countries(id), country3 int references countries(id) ) how should create classes , mappings in order to map them correctly to these tables ? (i use ef4 ctp5 code first) ignoring denormalized references multiple country entities now, write following: public class country { [key] public int countryid { get; set; } [maxlength(20)] public string name { get; set; } } public class person { public int personid { get; set; } [maxlength(20)] public string name { get; set; } public country country1 { get; set; } public country country2 { get; set; } public country country3 { get; set; } } of course, you'll need dbcontext: public class context : dbcontext { public dbset<person> people { get; set; } publ

Drupal View - load more with ajax -

i have view (block display) listing node titles of content type displaying latest 12 published items. displays underneath nodes of specific type. what i'd able load next 12 items ajax (i know pager hoping avoid it) , control offset based on node title. i think second request can achieved row number in query far i'm having trouble achieving working script. you can call view results drupal api: $results = views_get_view_result('my_view',$display, $args) and in arguments can pass start/end number of items, or else, depends how sorting results

permissions - users and logins in sql server 2005 express -

i created login named mylogin password= 'pass_1' then logged sql server using login & tried create database , gave error permission denied. then executed : sp_addsrvrolemember 'mylogin', 'dbcreator' then, again logged sql server using above login & tried create database, time database created successfully this because added dbcreator server role login. but, created user myloginuser login mylogin , executed query: execute user = 'myloginuser' then again tried create database, failed. why so? when login mylogin user myloginuser associated has permission create database why user not have permission? whats solution this? have grant permission user separately irrespective of permissions granted login? also, user created login , have created inside database? necessary? the default user login [mylogin] mylogin (which created executing sp_addsrvrolemember 'mylogin', 'dbcreator' hence mylogin user h

Delphi: function Result not emptied during for loop -

is normal? for := 1 10 x.test; x.test; x.test; x.test; function test: string; begin {$ifdef debug} debugmessage('result check = '+result,3); {$endif} result := result + 'a'; end; 10:39:59: result check = 10:39:59: result check = 10:39:59: result check = aa 10:39:59: result check = aaa 10:39:59: result check = aaaa 10:39:59: result check = aaaaa 10:39:59: result check = aaaaaa 10:39:59: result check = aaaaaaa 10:39:59: result check = aaaaaaaa 10:39:59: result check = aaaaaaaaa 10:39:59: result check = 10:39:59: result check = 10:39:59: result check = function result stack not freed during loop? :o result treated implicit var parameter function. imagine if wrote out explicitly way: procedure test(var result: string); begin result := result + 'a'; end; := 1 10 test(s); then expect append s . the fact throwing away result each time call why compiler decides finalise it. @gabr points out, elects not finaliz

e commerce - Preventing race conditions for ecommerce application with MySQL -

i'm building ecommerce application mysql, i'm having hard time coming solution prevents following race condition: two users checkout @ same time same item in cart. store has 1 item available sale. 1 user should able purchase last item, , other user should see error message because item out of stock. i'm using item counter keep track of number of items in inventory, figure decrement item after processing user's credit card. i know select...update query in mysql, i'd stay away locking rows or tables - unless that's best way ecommerce app solve problem. i'm interested in hearing other solutions other checking/decrementing item counter. why worried locking. wont hurt till have 100s of simultaneous customers @ time , database engines innodb made handle things. wont able way kind of atomicity , workaround. you need keep application level transaction management. checkout reserver_the_items_in_cart if(reservation_succesfull){

asp.net - Radiobuttonlist results not working when rbl's dynamically created -

i have 20 radiobuttonlists dynamically created - declared when form submitted. i have code totals number of answered questions , total value of answered questions. - code used work when radiobuttonlists hard coded page, not. - writing number of questions answered , total value of answers page come 0. can see why might not work radiobuttonlists dynamically created.? code behind: sub page_load(byval sender object, byval e eventargs) integer = 1 20 dim tablerow new tablerow() dim tablerowcell_1 new tablecell() tablerow.cells.add(tablerowcell_1) holidayquestionnairetable.rows.add(tablerow) dim question new radiobuttonlist question.id = "question" & question.items.insert(0, new listitem("", "1")) question.items.insert(1, new listitem("", "2")) tablerowcell_1.controls.add(question) next end sub ..

java - JGoodies Maven plugin NullPointerException -

i doing jgoodies gui application using maven. program run on idea, when created executible jar file dependencies, jar file created except running there error : exception in thread "main" java.lang.nullpointerexception @ bemukan.downloadaccelerator.home.(home.java:23 @ bemukan.downloadaccelerator.main.main(main.java:15) thats there nullpointerexception. wonder whether jgoodies maven plugin creating jar file. adding following plugin pom.xml, provided convert *.form files *.java files <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>ideauidesigner-maven-plugin</artifactid> <executions> <execution> <goals> <goal>javac2</goal> </goals> </execution> </executions> <configuration> <fork>true</fork> <debug>true</

java me - how to add a textBox and a TextField to a form in j2me -

i want display both textbox , textfield on screen @ time unable add textbox form. there way display both of them @ time. textbox @ top , textfield below it. plz me. pleased if code given thank u in advance a textbox screen , not item , therefore cannot add form , , there no way display both of these things on screen @ once. if want display additional text on screen while textbox active, can use title (via settitle() ), or scroll across top using setticker() .