Posts

Showing posts from May, 2013

c# - asp.net login control with internet explorer -

c# - asp.net login control with internet explorer - i have asp.net login command in web application. while run application in net explorer , type password displayed question marks. is able solve problem? useful project. normally means font it's trying utilize not contain character specified. did set specific character or non-default font? (the default symbol should asterisk, * - not sure font.) also, check character set pages. c# asp.net internet-explorer login-control

postgresql - postgres default timezone -

postgresql - postgres default timezone - i installed postgresql 9 , time showing 1 hr behind server time. running select now() shows: 2011-07-12 11:51:50.453842+00 the server date shows: tue jul 12 12:51:40 bst 2011 it 1 hr behind timezone shown in phppgadmin is: timezone etc/gmt0 i have tried going postgresql.conf , setting timezone = gmt running restart no change. any ideas thought have used server timezone not?! solution!: did set gmt before , hr behind..after searching around turns out needed set europe/london. takes business relationship +1 hr in british summer time, gmt not! the time zone session parameter. so, can alter timezone current session. see the doc. set timezone 'gmt'; or, more closely next sql standard, utilize set time zone command. notice 2 words "time zone" code above uses single word "timezone". set time zone 'utc'; the doc explains difference: set time zone extends syntax ...

Android Path collision problems/solutions -

Android Path collision problems/solutions - i have drawing application in android allows user draw finger, , stores resulting shapes android path s. allow user delete individual path s have drawn, have implemented this solution uses bounding rect each path , , uses inner multi-dimensional binary array represent pixels within bounding rect . populate array taking path's command points , track along using mathematical equation quadratic bezier curve, setting each element in array have pixel underneath 1. using above setup, when in erasing mode, first check collision between users finger , bounding rect , , if collides, check see if pixel beingness touched user set 1 in array. now, when user loads note, load of shapes arraylist of 'stroke' objects can display them , can loop through them checking collision when in erase mode. store rect , binary array strokes in custom object. working expected, memory footprint of storing of data, binary array each path's bo...

Can't locate git-cvsimport? -

Can't locate git-cvsimport? - is git-cvsimport part of standard git installation? have 2 servers git versions 1.7.3.1 , 1.7.4, none of them seem have git-cvsimport . part of later version? please help. thanks. the command "git cvsimport". it's subcommand of git, not separate binary/shell script (and should part of standard installation, if compile yourself. ubuntu or other linux packages might have separate bundle that). git

sql - How to simplify embedded mysql query into a JOIN? -

sql - How to simplify embedded mysql query into a JOIN? - i read performance problems embedded mysql queries, wanted know how alter next "join" (supposedly improve performance?). i have 2 tables: create table if not exists `blog_categories` ( `category_id` int(11) not null auto_increment, `category_name` varchar(300) collate utf8_unicode_ci not null, `category_name_url` varchar(300) collate utf8_unicode_ci not null, `category_status` enum('online','offline') collate utf8_unicode_ci not null default 'offline' ) engine=myisam default charset=utf8 collate=utf8_unicode_ci auto_increment=8 ; create table if not exists `blog_articles` ( `article_id` int(11) not null auto_increment, `article_title` tinytext collate utf8_unicode_ci not null, `category_name` varchar(100) collate utf8_unicode_ci not null ) engine=myisam default charset=utf8 collate=utf8_unicode_ci auto_increment=26 ; the logic select categories have articles ass...

Magento - get the "not formatted" prices -

Magento - get the "not formatted" prices - how can not formatted prices (without currency , without separator of thousands) ? thanks help. if have product instance can do $product->getprice(); and format want magento

c# - Can Automapper be used in a console application? -

c# - Can Automapper be used in a console application? - is possible utilize automapper in console application? its getting started page suggests bootstrapper class called application start up, there no farther details class add together , phone call main() . how go using in simple console app? you can initialize automapper in console startup, there's no limitations; application_start startup place web programme in .net/iis, ie code called once. configuration must phone call @ start of web project goes in method. edit comment: if don't want create mappings on fly, rather have place initialize mappings, create function called initializeautomapper , create mapper.configure<x, y> calls in here. in main() method, phone call function. there lots of ways handle configuration, simpler way handle it. code sample class programme { static void main(string[] args) { // app starting here initializeautomapp...

sql server - How can SQLServer notify a vb.net application of an event? -

sql server - How can SQLServer notify a vb.net application of an event? - is there relatively simple way vb.net application can notified of fact new value has been written table in sql server express 2008? polling not alternative since i'd need every 10 seconds nonstop. take @ having application subscribe query notifications. also using query notifications in .net 2.0 handle ad-hoc info refreshes sql-server vb.net architecture messaging

Android seekbar with streaming audio -

Android seekbar with streaming audio - i have media player streaming mp3. have seekbar, hwoever, not working. have tried actual raw file , seems work. think seekbar not getting duration of song. ideas? code: public class seekme extends activity implements runnable{ /** called when activity first created. */ mediaplayer mp; button playbutton; button stopbutton; seekbar seekme; int total; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); playbutton = (button)findviewbyid(r.id.play); stopbutton = (button)findviewbyid(r.id.stop); seekme = (seekbar)findviewbyid(r.id.seekbar1); final mediaplayer mp = new mediaplayer(); seek { mp.setdatasource("http://dl.dropbox.com/u/24535120/week%20of%20may%201/swanky%20tunes%20%26%20hard%20rock%20sofa%20-%20smolengrad%20%28original%20mix%29.mp3"); mp.setaudiostreamtype(audiomanager.strea...

php - Graph API wont display profile feed -

php - Graph API wont display profile feed - i'm using facebook api wall feed using graph api. <?php require_once('facebook.php'); // create our application instance (replace appid , secret). $facebook = new facebook(array( 'appid' => '188687744521977', 'secret' => 'c2c3692845602812f473436d1da95014', 'cookie' => true )); // user id $user = $facebook->getuser(); // may or may not have info based on whether user logged in. // if have $user id here, means know user logged // facebook, don't know if access token valid. access // token invalid if user logged out of facebook. if($user) { seek { // proceed knowing have logged in user who's authenticated. $access_token = $_session['fb_188687744521977_access_token']; $user_profile = $facebook->api('/me'); $likes = $facebook->api('/me?fields=feed,likes'); ...

winforms - C# Override OnValidating to support null value but breaks Data Binding -

winforms - C# Override OnValidating to support null value but breaks Data Binding - i have customtextbox inherits textbox , overwrites onvalidating method allow empty strings. customtextbox bound property cost in domain. public class customtextbox { protected override void onvalidating(...) { if(text=="") { text = null; return; } base.onvalidating(e); } } public class domain { public system.nullable<decimale> cost { ... } } all works except prevents users froming setting cost null. text=null; did not propogate domain object. there way reset cost null when user clears out textbox? if using binding propagate values domain object, should set logic in parse event instead. // add together binding var b = new binding("text", mydatasource, "boundproperty"); b.parse += onnullabletextbindingparsed; mytextbox.databindings.add(b); // sample parse handler pri...

javascript - Can I compare the source window from postMessage to my window.frames? -

javascript - Can I compare the source window from postMessage to my window.frames? - i want bubble info frame parent object (information isn't accessible due xss). can compare source window sent via postmessage values of window.frames ? mdn (in link above) says message can used postmessage doesn't refer testing equality. this works correctly on ie9 ff5 , chrome12 want know if dependable (i.e. in standard). test code: postmessageouter.html <!doctype html> <html> <head> <title>outer page</title> <script type="text/javascript"> window.addeventlistener("message", function (event) { (var = 0; < frames.length; ++i) if (event.source == frames[i]) alert(i); }, false); </script> </head> <body> <iframe src="postmessageinner.html"></iframe> <iframe src="postmessageinner.html">...

org.apache.cxf.BusException: No binding factory for namespace http://www.w3.org/2004/08/wsdl/http registered -

org.apache.cxf.BusException: No binding factory for namespace http://www.w3.org/2004/08/wsdl/http registered - hi using web services. getting error @ service.createdispatch method. qname qname = new qname("", ""); service service = service.create(qname); service.addport(qname, httpbinding.http_binding, "http://localhost:8080/rpc/rest/userservice/users"); map<string, object> requestcontext = dispatcher.getrequestcontext(); the finish error javax.xml.ws.webserviceexception: org.apache.cxf.busexception: no binding mill namespace http://www.w3.org/2004/08/wsdl/http registered. @ org.apache.cxf.jaxws.serviceimpl.getjaxwsendpoint(serviceimpl.java:237) @ org.apache.cxf.jaxws.serviceimpl.createdispatch(serviceimpl.java:587) @ org.apache.cxf.jaxws.serviceimpl.createdispatch(serviceimpl.java:568) @ javax.xml.ws.service.createdispatch(unknown source) @ com.infosys.iengage.action.contentupload.contentupload(contentupload.java:...

build - AR app for androids -

build - AR app for androids - i'm trying build augmented reality application androids. want show 3d models when recognizes different markers. i used first-class sdk, https://ar.qualcomm.at/qdevnet/sdk , followed steps, unfortunately when created application , ran on android, showed message "your device not supported". that's because guide 2.1 androids, , mine 2.2 is there way "convert" it? want create play on phone. is there way "convert" it? want create play on phone. not know of. qcar sdk checks device compatibility based on explicit conditions (e.g. snapdragon processor) , fails initialize if device not supported. there's list of supported devices available on dev forum - https://ar.qualcomm.at/qdevnet/forums android build augmented-reality

ANTLR test program hangs -

ANTLR test program hangs - i downloaded latest version of antlr (antlrworks 1.4.2 antlr 3.3). i started antlrworks ui, , entered sample expression evaluator grammar. next generated code antlrworks ui. next selected debug menu alternative generate input file , __test___.java all fine till now, however, when run __test___ command line, antlr hangs. set system.out's in java code, , seems programme hangs in next line __test___.java exprparser g = new exprparser(tokens, 49100, null); i tried printing token stream, not print anything. does have clue might going wrong? tried multiple grammars, same result. i running 64 bit ubuntu, openjdk. the debugger creates socket , waits connection made within antlrworks. can run auto generated __test__.java class within antlrworks. if want create test-class command line, utilize next class: class="lang-java prettyprint-override"> import org.antlr.runtime.*; public class main { public static void ma...

flash - FDT 4 Compiling SWF Application ignores new code -

flash - FDT 4 Compiling SWF Application ignores new code - so, i've been trying as3 application (pure) compile 6 hours, have made changes code, beingness ignored, i've deleted output swf, run compile, , creates new swf, still has old content, old code. i've tried reseting compilers, no avail. i've tried using 10 differnt flex sdks, no avail. i've tried installing 64bit , 32bit versions (i'm on osx), no avail. i'm totally stuck, supposed 24 hours of work, far have spent 6, , achieved nothing. anyone have ideas? this going sound totally stupid, but, had same issue , found had manually 'save as' every .as altered or ignore changes, coming flash builder background stumped me afternoon,fdt great coding, think itll take me while before understand how configuration works mean great piece of gear wish on stressful first utilize knowledge gap flash actionscript-3 fdt

How does P6SPY work? -

How does P6SPY work? - pretty much in question. discovered p6spy in association hibernate cool see actual sql queries, though i'm quite baffled on how works. how work? the basic thought on p6spy goes this: depending if go datasource or jdbc driver in code, instead of referring real ones, specify p6spy specific ones: com.p6spy.engine.spy.p6spydriver or com.p6spy.engine.spy.p6datasource respectively (for total documentation, see: http://p6spy.github.io/p6spy/configandusage.html). afterwards configure real ones in spy.properties file (using realdriver or realdatasource properties respectively) depending on configuration can accomplish logging of sql statements (using com.p6spy.engine.logging.p6logfactory ) so reply question, thought jdbc calls (statements execution, transaction related stuff) wrapped (proxied) p6spy , depending on configuration, these can logged via file logger (using appender=com.p6spy.engine.logging.appender.filelogger ), stdout logger (u...

c# - .net TypeConverters and domain usage -

c# - .net TypeConverters and domain usage - in general, there reason not utilize typeconverter conversion chores involving custom types have nil ui? im thinking cases more complex implict & explicit conversions. any links design guidelines & samples doing so? cheers, berryl update here motivation conversion, party - partyrelationship pattern party can have 1 or many partynames. when party person, 1 required name personname. the personname has attributes different partyname , valueobject. used ui / formatting type tasks whereas partyname entity , persisted database. so conversions needed: - load db presentation: (partyname --> personname) - add together new contact db: (personname --> partyname) here's good link explains difference between typeconverter , implementing iconvertible . but, basically, typeconverter built for, , useful for, doing type conversions @ design time. example, it's how xaml converts types xml ,...

Javascript "var obj = new Object" Equivalent in C# -

Javascript "var obj = new Object" Equivalent in C# - is there easy way create , object , set properties in c# can in javascript. example javascript: var obj = new object; obj.value = 123476; obj.description = "this new object"; obj.mode = 1; try c# anonymous classes var obj = new { value = 123475, description = "this new object", mode = 1 }; there lots of differences though... @valera kolupaev & @glennferrielive mentioned approach dynamic keyword c# javascript oop object translation

core data - Why is fetchedResultsController set to nil? -

core data - Why is fetchedResultsController set to nil? - why in fetchedresultscontroller code apple gives us? if (fetchedresultscontroller != nil) { homecoming fetchedresultscontroller; } this because need set fetchedresultscontroller once. below statement there load of set initialise fetchedresultscontroller . so first time nail method calling fetchedresultscontroller ivar set subsequent calls fetchedresultscontroller homecoming set ivar. core-data ios4

mysql - must match both columns in boolean mode -

mysql - must match both columns in boolean mode - i have sql query currently: select htext paragraphs match(htext, keywords) against('+genomics' in boolean mode) order match(htext) against('+genomics' in boolean mode)desc however i'm getting rows if match in either htext or keywords...i want keyword have match in htext , keywords. im having issues ordering relevance in mysql 5.1 select htext, match(htext) against('+genomics' in boolean mode) relevance paragraphs match(htext) against('+genomics' in boolean mode) , match(keywords) against('+genomics' in boolean mode) order relevance desc mysql

How to change the values dynamically in the NSMutableArray in iPhone? -

How to change the values dynamically in the NSMutableArray in iPhone? - i have 10 buttons , wrote button action using switch case. when click each button, increment amount of values. if using 10 different variables set count value variable, work. other possible way accomplish this? i want alter values dynamically in mutable array. for eg: -(ibaction) btnaction : (id) sender{ switch (btn.tag) { case 0: // amountarray mutable array. startcococount = startcococount + 10; //nsstring *str = [nsstring stringwithformat:@"%d", startcococount]; //[amountarray addobject:str]; break; case 1: startcococount = startcococount + 15; //nsstring *str = [nsstring stringwithformat:@"%d", startcococount]; //[amountarray addobject:str]; break; case 2: ...

smartgwt - upload and show image in browser -

smartgwt - upload and show image in browser - does know how can create user interface using smartgwt person uploads image , image displayed on screen? i tried uploaditem shows brows button using can go location of image file want show uploaded image on screen is possible in smartgwt? smartgwt

cygwin - TaskMemoryManager is disabled -

cygwin - TaskMemoryManager is disabled - i trying execute tasktracker on cygwin next error occur's as:- mapred.tasktracker: process tree implementation missing on system. taskmemorymanager disabled. rest (i.e. namenode,secondarynamenode,jobtracker , datanode) working through cygwin issue tasktracker.i hadoop version:hadoop-19.0.1 so,how rid of it.if knows please help!. help appreciated! i didn't encountered specific problem ... make sure using same hadoop version in utilize on cluster. update hadoop more recent version if possible. the next patches may address (or maybe not) problem: https://issues.apache.org/jira/browse/hadoop-6230 https://issues.apache.org/jira/browse/mapreduce-834 cygwin hadoop

mysql - Does splitting tables in DB help with performance issue? -

mysql - Does splitting tables in DB help with performance issue? - i come problem recently. i working in project friend, while friend design database, splited same kind of info different tables according month(one table per month). reason db performance. i'm little uncertainty solution, since set tables 1 single machine, think performance same building index date. can discuss , give me hints? unless there more approximately tens of millions of rows per month, splitting not thought , not provide more db performance. you much improve performance gains identifying right indexes query workload. when have have many millions of rows per month, partitioning table date ranges might improve performance in situations (depends on query workload). mysql sql database datatable

dependencies - Simple way to add jar URL as dependency in sbt -

dependencies - Simple way to add jar URL as dependency in sbt - is there way sbt (0.10) declare jar @ url (http://foo.com/bar-1.1.jar) library dependency? you can specify explicit url jar. if utilize basic configuration include follows librarydependencies += "slinky" % "slinky" % "2.1" "http://slinky2.googlecode.com/svn/artifacts/2.1/slinky.jar" as stated in sbt wiki on github url used fallback in case artifact isn't resolved via ivy. more details see paragraph explicit url jar dependencies sbt

c# - Control resize on finger touch in wp7 -

c# - Control resize on finger touch in wp7 - i want resize command on finger touch in windows phone 7 appl.can 1 help me? thanks i have feeling looking command tilt effect. tilt effect effect of slight move in plane projection of controls when touched. you can larn tilt effect , how utilize here: http://blogs.msdn.com/b/ptorr/archive/2010/03/23/tilt-effect-for-windows-phone-controls.aspx c# windows-phone-7 c#-3.0

asp.net - Visual Studio 2010 bug - editor -

asp.net - Visual Studio 2010 bug - editor - i ran unusual behavior in vs2010 sp1 ide. when modify aspx page viewing markup, duplication in nearby controls. for example, have dropdownlist command looks this: <asp:dropdownlist id="cbopreviousphone" width="350px" cssclass="entrytext"></asp:dropdownlist> directly above it, add together table tags. when add together tr tags, id of dropdown list changes this: <asp:dropdownlist id="cbopreviousphor" width="350px" cssclass="entrytext"></asp:dropdownlist> if type "tr1234" in tag instead, dropdown changes this: <asp:dropdownlist id="cbopreviousphotr1234r" width="350px" c`ssclass="entrytext">/asp:dropdownlist> i tried project on machine , same thing. deleted designer file, same thing. any ideas why this? asp.net visual-studio visual-studio-2010

Java printwriter -

Java printwriter - i have proxy class, receives request , send request server , gets response , directs original requestor. utilize socket connect server , utilize printwriter write it. private printwriter out; public void writestring( string message ) throws ioexception { openstreams(); out.print( message); out.flush(); } i start proxy , send request server via proxy. problem see lot of these request/response in console of proxy. there different way of doing this, console left cleaner. new socket programing thanks in advance it sounds have system.out.println or debug logging statement somewhere else in code. quick text-search through various java files , search system.out statements. if using logging framework log4j/slf4j, check if logging @ inappropriate level (info instead of debug maybe) , tune logger config appropriate lever and/or log file instead of console. java

select - jquery value in dropdown selected disable checkbox -

select - jquery value in dropdown selected disable checkbox - i trying utilize jquery disable checkbox when selected value of dropdown menu other 0. problem when select item 0 value checkbox beingness disabled , checkbox disable have select @ to the lowest degree 2 or more values before disbale checkbox. an illustration of code here: example code @ js fiddle when selected value 0 want checkbox , drop downwards enabled , when selected value other 0 want disable checkbox. work whether start first row, bottom, row, or middle row. this should it, if understanding of problem correct: $("select").change(function() { $(this).closest("td").prev().find(":checkbox").prop("disabled", $(this).val() !== "0"); }); $(":checkbox").change(function() { $(this).parent().next().find("select").prop("disabled", this.checked); }); your updated fiddle. jquery select checkbox drop-down-men...

c++ - if statement error! -

c++ - if statement error! - i got next error: error: no matching function phone call 'max(int&, int&, int&, int&)' my code is: #include <iostream> #include <cstdlib> #include <ctime> #include <time.h> #include <string> #include <cstring> #include <stdlib.h> #include <stdio.h> using namespace std; int main() { srand(time(null)); int g1l= rand()%5; int g1r= rand()%5; int g2l= rand()%5; int g2r= rand()%5; int g3l= rand()%5; int g3r= rand()%5; int g4l= rand()%5; int g4r= rand()%5; int g5l= rand()%5; int g5r= rand()%5; int g6l= rand()%5; int g6r= rand()%5; int manudw = 0; int manudd = 0; int manudl = 0; int lagalw = 0; int lagald = 0; int lagall = 0; int rmadw = 0; int rmadd = 0; int rmadl = 0; int acmilw = 0; int acmild = 0; int acmill = 0; int manudp = ((manudw*3)+(manudd*1)); int lagalp = (...

pop up - Flex 4 addPopUp throwing error: " ArgumentError: Undefined state 'inactive' " -

pop up - Flex 4 addPopUp throwing error: " ArgumentError: Undefined state 'inactive' " - i trying seemingly simple. open pop-up. else error? var mytitlewindow = new titlewindow(); mytitlewindow.title = "my window title"; mytitlewindow.width = 220; mytitlewindow.height = 150; popupmanager.addpopup(mytitlewindow, flexglobals.toplevelapplication displayobject, true); argumenterror: undefined state 'inactive'. @ mx.core::uicomponent/getstate() @ mx.core::uicomponent/findcommonbasestate() @ mx.core::uicomponent/commitcurrentstate() @ mx.core::uicomponent/commitproperties() @ spark.components.supportclasses::groupbase/commitproperties() @ spark.components::group/commitproperties() @ mx.core::uicomponent/validateproperties() @ mx.managers::layoutmanager/validateclient() @ mx.managers::popupmanagerimpl/addpopup() @ mx.managers::popupmanager$/addpopup() ...

Best practices for keeping JUnit testing up to date -

Best practices for keeping JUnit testing up to date - i have been given tasks of re-organization , documentation of bunch of junit tests, 1800, have little documentation , not organized well. know best practice organizing unit tests , keeping documentation them date? going forward, want able determine if test aspect of our code exists prevent unit test duplication , wasting time looking existing test. sure others have experienced joy of organizing , maintaining big amounts of unit tests, advice on appreciated. you utilize code coverage tool cobertura create study shows parts of code exercised during test run. of course, beingness exercised not mean test contains meaningful , sufficient assertions, @ to the lowest degree shows areas not have tests @ all. going forward, before changing code, create sure there test case before modifying code. when filing bug report, write test case shows faulty behaviour. junit useful regression tests, , that, need have cases part...

c++ - Safe way of casting void* to something higher? -

c++ - Safe way of casting void* to something higher? - i've got generic class manages resources of kinds of types, since don't want create instance of resourcemanager every t there (thus having 1 resource manager each type t), have create type of t unknown resourcemanager class. i saving map of void* pointers , converting them required format if requests type out of templated load() method; template <typename t> t* load(const std::string &location) { //do stuff here //everybody take cover!!! homecoming static_cast<t*>(m_resources[location]); } i utilize template specialization introduce different loaders class: template<> awesometype* load(const std::string &location) { //etc. homecoming static_cast<awesometype*>(m_resources[location]); } i aware ugly, there no way around right now. introduce static maps in within of specialized load methods, way can't bind lifetime of resources lifetime of resour...

c++ - How to store various types of function pointers together? -

c++ - How to store various types of function pointers together? - normal pointers can stored using generic void* . e.g. void* arr[10]; arr[0] = pchar; arr[1] = pint; arr[2] = pa; sometime back, came across give-and-take that, void* may not capable plenty store function pointer without data-loss in platforms (say 64-bit , more). not sure fact though. if that's true, portable way store collection of function pointers ? [note: this question doesn't satisfactorily reply this.] edit: storing function pointers index. there typecasting associated every index whenever collection accessed. of now, interested create array or vector of it.] you can convert function pointer function pointer of function type , without loss. so long when create phone call through function pointer typecast right type first, can store of function pointers in like: typedef void (*fcn_ptr)(void); // 'generic' function pointer fcn_ptr arr[10]; c++ c function-p...

php - drupal db_query not working when trying to insert negative number -

php - drupal db_query not working when trying to insert negative number - so have code: $query = "replace {tbl} set a_id = %d, p_id = %d, comment = '%s'"; db_query($query,1321,-1,"lolo"); but when execute it, instead of inserting -1, inserted 0 instead.... using insert same thing... how can set -1? using drupal 6 p_id column integer in mysql i check p_id not flagged unsigned integer php mysql drupal replace

ruby on rails 3 - Shared database on Heroku not working -

ruby on rails 3 - Shared database on Heroku not working - i have app1 as: ~/code/notifier/app1(master) $ heroku config bundle_without => development:test database_url => postgres://abs-@ec2-50-19-213-76.compute-1.amazonaws.com/uobbhrmyhj lang => en_us.utf-8 rack_env => production shared_database_url => postgres://abs-@ec2-50-19-213-76.compute-1.amazonaws.com/uobbhrmyhj ~/code/notifier/app1(master) $ heroku console ruby console app1.heroku.com >> user => user(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, confirmation_token: string, confirmed_at: datetime, confirmation_sent_at: datetime, created_at: datetime, updated_at: datetime) >> and app2 as: ~/code/notifier/app2(mast...

Difference between HTML5 and jQuery -

Difference between HTML5 and jQuery - is there difference between html5 , jquery, or jquery instrument can utilize in html5 logic ? i little confused terminology guess , hope can enlighten me. html5 markup language. jquery javascript library. they're not same thing. they related however: javascript code embedded in (or referenced from) html5 documents can utilize objects , methods provided jquery perform tasks. jquery html5 terminology

javascript - Calculate the sum of products using a td attribute -

javascript - Calculate the sum of products using a td attribute - i have table : <table> <thead> <tr> <th>quantity</th> <th>&nbsp;</th> <th>price</th> <th>sum</th> </tr></thead> <tbody> <tr class="sum"> <td><input class="qty" type="text" value="1" /></td> <td>german format: </td> <td data_price="1375.5">1.375,50 &euro;</td> <td></td> </tr> <tr class="sum"> <td><input class="qty" type="text" value="1" /></td> <td>english format:</td> <td data_price="1375.5">&euro;1,375.50</td> <td...

c - total number of lines of a file (counting backwards) -

c - total number of lines of a file (counting backwards) - for given file, can count number of lines backwards? i.e. starting eof, counting lines till beginning? i fseek end of file. start form there, maintain looking new line char (indication of new line) , maintain incrementing line_number count. should ending condition? is there opposite of eof? :) my own suggestion: if looking xth line end, origin @ line number : total_lines - x --- fair enough? motive: interested in getting xth line form end of huge (read huge) file. so, looking optimal solution. ps: not homework (though lifetime pupil :p) the opposite of eof pos == 0. the posix tail command this; illustration code, see http://www.koders.com/c/fid8dee98a42c35a1346fa89c328cc3bf94e25cf377.aspx c file eof

css - jQuery container height() not calculated properly -

css - jQuery container height() not calculated properly - $('.container').height(); gives wrong value when it's kid elements have spacing css attributes on it: <div class="container"> <div style="padding: 10px;"> weiorng3poin4gr9p34ng9p34n5g934ng5o43ng534g <div style="margin: 20px; "> eiong349ng49ng934ng59p34n5g439g5 </div> </div> </div> how can right height of .container ? does container <div> have padding/margin/border? if so, can seek this: $(".container").outerheight(true);//will consider margin , border width well. jquery css jquery-selectors height

c++ cli - Visual C++ 2010: Changes to MSVC runtime deployment (no more SxS with manifest) -

c++ cli - Visual C++ 2010: Changes to MSVC runtime deployment (no more SxS with manifest) - where can find official note, kb article or other documentation describing changes visual studio 2010 c/c++ runtime linking , deployment policy? under visual studio 2008 (with vc90 runtime) manifest embedded in native images, , runtime libraries deployed side-by-side assemblies (winsxs). caused problems when rebuilding native exe or library using vs 2008 sp1, in updated version of c++ runtime required embedded manifest. for vs 2010 , msvcr100 runtime version, policy seems have changed completely. the file msvcr100.dll , other c/c++ runtime libraries no longer install sxs assemblies. when compiling under vs2010, no runtime 'dependency' entry added embedded manifest, meaning version of msvcr100.dll might loaded @ runtime. on machines .net 4 installed, matching runtime named msvcr100_clr0400.dll, , won't loaded native code, though re-create renamed msvcr100.dll works fine. ...

qr code - QRCODE image to display on the android phone screen -

qr code - QRCODE image to display on the android phone screen - i want generate qr code string. in cases find in forum, generated qr generating image. want qr code display on screen out having save re-create of it. of course of study possible generate qr code image @ runtime. instance, website "wolfram alpha" it. seek url: http://www.wolframalpha.com/input/?i=qr+code+www.stackexchange.com so if can phone call website , capture output, can display qr code in app. another potential source http://zxing.appspot.com/generator/. android qr-code

Non-blocking socket in Python? -

Non-blocking socket in Python? - is me, or can not find tutorial on non-blocking sockets in python? i'm not sure how work .recv , .send in it. according python docs, (my understanding of it, @ least) recv 'ed or send 'ed info might partial data. mean have somehow concatenate info while recv , create sure info sends through in send . if so, how? illustration much appreciated. it doesn't matter if socket in non-blocking mode or not, recv/send work pretty much same; difference non-blocking socket throws 'resource temporarily unavailable' error instead of waiting data/socket. recv method returns numbers of bytes received, told less or equal passed bufsize. if want receive size bytes, should similar next code: def recvall(sock, size): info = '' while len(data) < size: d = sock.recv(size - len(data)) if not d: # connection closed remote host, best homecoming none info += d homecoming info ...

Using ctypes in python to acces a C# dll's methods -

Using ctypes in python to acces a C# dll's methods - i implement c# code in critical part of python programme create faster. says (on python documentation , this site) can load dynamic link library (and pydocs) follows: cdll.loadlibrary("your-dll-goes-here.dll") this part of code takes care of feature: from ctypes import * z = [0.0,0.0] c = [left+x*(right-left)/self.size, up+y*(down-up)/self.size] m = 2.0 iterator = cdll.loadlibrary("recercatools.dll") array_result = iterator.program.iterate(z[0],z[1],c[0],c[1],self.iterations,m) z = complex(array_result[0],array_result[1]) c = complex(array_result[2],array_result[3]) last_iteration = int(round(array_result[4])) and recercatools.dll utilize (c# code, not c or c++): using system; using system.collections.generic; using system.linq; using system.text; using karlstools; public class programme { public static array iterate(double z_r,double z_i,double c_r, double...

java - How can I display the content of a map in PrimeFaces -

java - How can I display the content of a map in PrimeFaces - i have hashmap: hashmap<entity1,list<entity2>>(); . how can display content of these map using p:datatable in primefaces ? tried sheet map <p:datatable value="#{tabulky.tabulka.sheet}" var="item" scrollable="true" height="500" emptymessage=" ziadne info nenajdene &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"> <f:facet name="header"> <h:outputtext value="listocky"/> </f:facet> <p:column> <f:facet name="header"> <h:outputtext value="#{item}"/> </f:facet> <c:foreach items="#{(item.value)}" var="item1"> <p:column headertext="hokej"> <h:outputtext v...

hash - hashing strings -

hash - hashing strings - i have streaming strings (text containing words , number). taking 1 line @ time streaming strings, assign unique value them. the examples may be:strings scores/hash user1 logged in comp1 port8087 1109 user2 logged in comp2 1135 user3 logged in port8080 1098 user1 logged in comp2 port8080 1178 these string should in same cluster. have thought mapping(bad type of hashing) strings such little alter in string wont impact score much. one simple way of doing may be: taking ulicp8, ulic .... ( i.e. 1st letter of each sentence) , find way of scoring. after similar scored strings kept in same bucket , later on sub grouping them. the improved method be: lets not take out first word of each word of string find way take representative value of word such string representation may quite suitable mapping score/hash mention. considering levenstein distance or jaccard_index or similarity dista...

mvc mini profiler - Retrieve previous requests profiling data -

mvc mini profiler - Retrieve previous requests profiling data - i have incorporated mini-profiler in mvc app have question. when have controller looking below can't see execution took place, ideas? controller1.action1 executes , redirecttoaction(action2) action2 run my problem can't seem execution of step 1 above step 2. yes know client side redirect involved. grab latest version repo, display lastly n requests not displayed, per user. this way track redirects , posts mvc-mini-profiler

pgadmin - Restart PostgreSQL Remotely -

pgadmin - Restart PostgreSQL Remotely - can remotely restart postgresql server throught pgadmin ? user administrative privileges. regards, dino i don't think there such possibility. @ best can reload connected postgresql server using pg_reload_conf() function: pg_reload_conf sends sighup signal server, causing configuration files reloaded server processes. command: select pg_reload_conf(); you can install adminpack contrib module , reload server using tools menu. edit: according pgadmin documentation: if pgadmin running on windows machine, can command postmaster service if have plenty access rights. come in name of service. in case of remote server, must prepended machine name (e.g. pse1\pgsql-8.0). pgadmin automatically find services running on local machine. if pgadmin running on unix machine, can command processes running on local machine if have plenty access rights. come in total path , needed ...

android - Flex Mobile Maven Build -

android - Flex Mobile Maven Build - i'm trying find out if there way build flex mobile project using maven. when run maven build want have apk-file , ipa-file output of build process. cool if there way run unit tests too. what wanna have solution, tutorial or illustration of how handle that. any suggestions? flex mojos defacto standard building flex applications maven. knowledge not back upwards mobile builds. if have experience ant, can write ant-based build , utilize maven antrun plugin bind execution of targets maven phases. below illustration clean, compile, test , package: <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-antrun-plugin</artifactid> <version>1.6</version> <executions> <execution> <id>clean-project</id> ...

php - Extract the highest value of each day -

php - Extract the highest value of each day - i have database table total of transactions transactionids , datetime fields. guess, datetime field , transactionids increasing , balance field either increasing / staying same / or decreasing. i extract highest transactionid , corresponding balance @ end of every day. thank in advance time , assistance. sample table format: transactionid|date (datetime)|amount|balance| select t1.`date`, t1.transactionid, t2.balance ( select `date`, max(transactionid) `transactionid` table grouping date(`date`) ) t1 inner bring together table t2 on t2.transactionid = t1.transactionid order t1.`date` php mysql

Why are the different output of C++ and C# compiler? -

Why are the different output of C++ and C# compiler? - i have been asked questions before time want know difference between compiler of c++ , c# . c# coding of array static void main(string[] args) { int n; int[] ar = new int[50]; console.write("enter size of array= "); n = int.parse(console.readline()); (int = 0; < n; i++) { ar[i] = int.parse(console.readline()); } (int = 0; < n; i++) { console.writeline("ar[" + + "]=" + ar[i]); } console.read(); } output c++ coding of array int main() { clrscr(); int x[10]; int n; cout << "enter array size= "; cin >> n; cout << "enter elements array= "; for(int = 0; < n; i++) { cin >> x[i]; } for(int = 0; < n; i++) { cout << "x[" ...