Posts

Showing posts from July, 2011

authentication - How to check user authanticaon on an asp page -

authentication - How to check user authanticaon on an asp page - i have 3 page login.asp , check.asp , admin.asp . want block user access page typing url www.xxxxxxx.xxx/admin.asp .how ı can ? there way check redirected page.? ı want check.asp page can redirect admin.asp page i know session solution ı want utilize 1 essentially need set kind of authentication token identifies user has been authenticated. done either cookie or session value. then, on page requires authentication, check existence of token. if token (which can simple boolean isauthenticated value or integer userid value, or complex finish user object need know person, roles, etc.) valid, render page. if not valid, redirect or display message of kind. authentication asp-classic login-control

jQuery Isotope Combination Filters mixed with BBQ Hash History - Need help understanding how to -

jQuery Isotope Combination Filters mixed with BBQ Hash History - Need help understanding how to - i trying understand how utilize combination filters jquery bbq hash history. what want have user filter logos, identity or branding. if user clicks logos, want them able subfilter "non-profit, education, retail" etc. know combination filters work fine without jquery bbq code implemented, both. $optionsets.find('.filter-main a').click(function(){ var $this = $(this); // don't proceed if selected if ( $this.hasclass('selected') ) { return; } changeselectedlink( $this ); // href attr, remove leading # var href = $this.attr('href').replace( /^#/, '' ), // convert href object // i.e. 'filter=.inner-transition' -> { filter: '.inner-transition' } alternative = $.deparam( href, true ); // apply new alternative previous $.extend( isotopeoptions, al...

iphone - Is - [UIView (MyOwnCategory) drawRect:] never called on 3.1.3? -

iphone - Is - [UIView (MyOwnCategory) drawRect:] never called on 3.1.3? - i define own own drawrect method , called on 4.2.1 (ios) 5.0 (ios) , 4.3.2 (simulator) sucesfully. never called on 3.1.3 (iphone 2g). what reason this? p.s. since start write question think 3.1.3 device jailbroken. maybe root cause of unusual behaviour. upd: reproduce issue utilize next code: @implementation uiview (myowncategory) - (void)drawrect:(cgrect)rect { const char * function = __function__; [nsexception raise: @"hi!" format: @"%s", function]; } @end exception never happened on 3.1.3 when phone call [super drawrect: rect] explicitly i wanted write method swizzling few weeks now, , @kevin ballard's comment made me (thank inspiration, kevin). so here's solution problem using method swizzling should work on ios 3.x: uiview+border.h: #import <foundation/foundation.h> @interface uiview(border) @end uiview+border.m: #import ...

linux - Get certain bunch of rows -

linux - Get certain bunch of rows - i need help in following: have kind of file, named file-1 1 ++++++^^++++ ++++++++++++ +++++++++^^^ ^^++++++++++ 2 ++++++++++++ ^^^+++++^^^^ ^^^^^^^+++++ +++++^^^++^+ now, print out part in starting number same in file, named file-2 . allow file-2 contains 1 value, need output: 1 ++++++^^++++ ++++++++++++ +++++++++^^^ ^^++++++++++ can suggest me something? $ awk -v rs='' 'nr==fnr{split($0, a, /\n/); next}; $1 in a' file-{2,1} 1 ++++++^^++++ ++++++++++++ +++++++++^^^ ^^++++++++++ file-2 contains indexes line line: 1 3 5 explaination: rs='' tell awk read multi-line records nr==fnr read file-2 one-line, should split \n , , save result in array a next skip rest commands, ready read file-1 $1 in a test whether file-1 's 1st column in array a file-{2,1} should read file-2 first indexes linux sed awk

IPhone: Copy/Clone -

IPhone: Copy/Clone - i want re-create or clone object of own written class. if phone call re-create function pointer copied. if alter copied object original object changed, too. is there way/function clone object? best regards melanie an object can copied if class adopts nscopying protocol , implements single method, copywithzone:. see object copying - (id)copywithzone:(nszone *)zone{ myclass *copy = [[[self class] allocwithzone: zone] init]; [copy setproperty1:[self property1]]; homecoming copy; } iphone copy clone

how to display a web page with python? -

how to display a web page with python? - i learning python @ college. have got stupid question. how create web page python? i , save test.py print "hello test \n"; print "\n" print "just testing \n"; when go url same output print "hello test \n"; print "\n" print "just testing \n"; i confused. doing wrong? hosting hostgator. on web site says this: #!/usr/bin/python print "content-type: text/html\n\n"; print "<html><head>"; print "<title>cgi test</title>"; print "</head><body>"; print "<p>test page using python</p>"; print "</body></html>"; this gives me same error. try run on local machine first: making simple web server in python. python

c - `pkg-config` argument for clang from Java -

c - `pkg-config` argument for clang from Java - i'm trying run clang compile java application. works great until seek , pass pkg-config argument. example: clang -i/usr/lib/gcc/x86_64-linux-gnu/4.6/include `pkg-config --cflags --libs gtk+-2.0` -o file.o main.c a line similar line works terminal fails java. clang reports 'no such file or directory: '`pkg-config --cflags --libs gtk+-2.0`' error. i using next code launch compiler: list<string> cmd = new linkedlist<string>(); cmd.add("clang"); cmd.add("-i/usr/lib/gcc/x86_64-linux-gnu/4.6/include"); cmd.add("`pkg-config --cflags --libs gtk+-2.0`"); cmd.add("-o"); cmd.add("file.o"); cmd.add("main.c"); process proc = runtime.getruntime().exec(cmd.toarray(new string[0])); ... any ideas why works fine terminal exact same line fails when beingness called java? pkg-config not parameter, command find files needed. when run bash, ...

.net - WSE 3.0 - Byte array being encoded as Base64 and not "MTOM-ing" to binary -

.net - WSE 3.0 - Byte array being encoded as Base64 and not "MTOM-ing" to binary - i have couple of other questions on here surrounding area bit redundant now. answers them appreciated question main concern @ minute. i have followed lots of examples of how mtom/xop works in wse 3.0 , have set project seems required. have byte array field designated datatype:-base64binary. in set byte array of attachment want add. when run application , check request, info encoded inline base64, i.e. without xop include element , associated mime part. my understanding of mtom within wse 3.0 that, when encoding take field designated base64binary , encode binary , move mime part, replacing xop include element. say, worked. have set service, in reference file, inherit microsoft.web.services3.webservicesclientprotocol , have set requiremtom flag true, , still not encoding correctly. have missed here? there other steps should implemented work? edit: after looking through code 100t...

php - Progress bar showing database progress -

php - Progress bar showing database progress - i wondering, since i'm making gpt script, need installation scheme insert database queries, , create tables. i know how that, problem want show progress of creating files, registering product server, progress bar, user knows how much longer they'll waiting. how can this? php runs server-side, jquery runs client-side. have phone call server-side script repeatedly, either check number of rows have been inserted or tables have been created, etc...or tell perform step, updating progress bar on each call. either way performance hit, not idea. php jquery mysql install

coldfusion - Throwing error from cfc - cflocation doesn't work from inside onerror() -

coldfusion - Throwing error from cfc - cflocation doesn't work from inside onerror() - edit: of import piece might i'm calling chlorofluorocarbon method via ajax... i'm calling chlorofluorocarbon method via ajax, returns info utilize in jqgrid table. within cfc's method, i'm trying set error handling, instead of failing , giving user no indication of problems, send users error page, defined error.cfm in root directory, , right includes boilerplate html. within application.cfc, i've defined onerror() method so: <cffunction name="onerror" returntype="void" output="false" > <cfargument name="exception" required="true" > <cfargument name="eventname" type="string" required="true" > <cfmail to="#application.registration_notification#" from="outgoing address" subject="error"> </cfmail> ...

matlab - Issue in viewing double values -

matlab - Issue in viewing double values - i having issue viewing double info in matlab console. actually, importing matrix info file. value of particular row , column 1.543 in console when utilize disp(x) x matrix imported, showing 1.0e+03 * 0.0002 . however, when seek access particular element in matrix using disp(x(25,25)) 25 , 25 row , column numbers showing 1.543 . confused. clarifications. when print whole matrix showing 1.0e+03 * 0.0002 . the next command should prepare it. display issue, precision of actual values in matrix not affected: format shortg matlab floating-point double number-formatting

android - How to uninstall own app from /system/app? -

android - How to uninstall own app from /system/app? - i'm able install own application /system/app using adb shell commands. how uninstall it? there commands it? phone rooted. manual uninstall using adb : http://www.careace.net/2010/05/12/how-to-remove-android-apps-through-adb/ programmatically: public static void deletefromsystem (final string file) { seek { if (new file(file).exists()) { string path = new file(file).getparent(); process process = runtime.getruntime().exec("su"); dataoutputstream os = new dataoutputstream(process.getoutputstream()); os.writebytes("mount -o rw,remount /system; \n"); os.writebytes("chmod 777 " + path + "; \n"); os.writebytes("chmod 777 " + file + "; \n"); os.writebytes("rm -r " ...

ios - Local notification handling when application is closed -

ios - Local notification handling when application is closed - i have question related handling notifications in case of application closed. in ios application schedule local notifications, , handle them when application either in foreground or background. when application closed , local notification can't handle it. mean after pressing "show" button have move user specific window. don't know set part of code deals handling. idea??? in advance. armen check - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions in app delegate, should receive dictionary notification launching options, far know. try this ios event-handling notifications localnotification

c# - ASP.NET Credentials Issue -

c# - ASP.NET Credentials Issue - i've been working on asp.net 4.0 website , seem having issue deleting database stored in app_data folder. i created domain grouping in actice directory , used web.config file restrict access pages allow modifcation of database. worked fine on test machine , production server, issue on server, though recognizes user when access page, when seek delete item denies access , not allow delete item. the users had read/write permissions folder, still denied access. did testing , allowed read/write acces, , allowed me delete, don't having alternative set up. does know causes issue , proper prepare be? i'm assuming have allow website know user running application before tries delete can write database, thought automatically since used windows authentication. if has info appreciate it. the user business relationship running application pool website user business relationship needs modify permissions database file. c# a...

looping over PHP array -

looping over PHP array - i not php dev. working google api , backend using php. working illustration returns locations within distance of given zipcode. result set returned php of next format.. array ( [0] => array ( [id] => 554 [postcode] => 1225 [suburb] => royal exchange [aus_post_name] => royal exchange [state] => nsw [lat] => -33.864393 [lon] => 151.209608 ) [1] => array ( [id] => 559 [postcode] => 1230 [suburb] => queen victoria building [aus_post_name] => queen victoria building [state] => nsw [lat] => -33.872049 [lon] => 151.206428 ) [2] => array ( [id] => 714 [postcode] => 2000 [suburb] => barangaroo [aus_post_name] => barangaroo [state] => nsw [lat] => -33.858315 [lon] => 151.203519 ) [3] => array ( [id] => 715 [postcode] => 2000 [suburb] => dawes point [aus_post_name] => dawes point [state] => nsw [lat] => -33.855601 [lon] => 151.20822 ) how loop on result set,...

c# - opencvsharp application post-setup not working -

c# - opencvsharp application post-setup not working - i have made application in opencvsharp.it works great. have made setup/installer app , have included dlls required, mentioned in readme file comes along opencvsharp, have included opencvsharextern.dll . when execute setup in pc, installs app fine , app runs fine too. when install app on someother pc, installs fine, when run on pc, throws exception p/invoke , cxcore210.dll... what doing wrong? thanks when reference dll in project, referencing dll in location gets installed installer? e.g. if dll installed 1 directory in folder should referenced on pc when build it, 1 directory same named folder. i'm wondering if when build app on pc referencing dll different location (which works find on pc because exists) on pc can't find it. c# winforms opencv

jquery - update the html page with ajax for every 5 seconds -

jquery - update the html page with ajax for every 5 seconds - well have used html file these in iframe <iframe src="sample.html"></iframe> is there way refresh these html file every 5 seconds using ajax not refreshing user rather should updating i know way in javascript looks ugly, refreshing icon keeps on refreshing in browser.i want avoid possible these in ajax should not refreshing?thanks try this $(function () { setinterval(function () { var x = $('iframe').attr('src'); $('iframe').attr('src', x); }, 5000); }) ajax jquery

C++ Cyclic Dependency Design -

C++ Cyclic Dependency Design - been using solutions while... first question asked. (not sure if proper venue). stuck design problem. i have 3 classes, user, strategy, & communicator. i user have pointer communicator, , phone call functions when necessary. i user have list of class strategy, , phone call functions of strategy when necessary. i communicator have list of class strategy, , pointer user, , phone call functions on when necessary. if helps, communicator simply wrapper around socket connection listens messages client , sends them user or strategy, whichever appropriate. contains function send(string message) sends messages user & strategy client. the problem cannot compile, since header files end including each other. ideas appreciated! forward declarations friends. strategy.h: class user; class communicator; class strategy { /* definition of strategy, restricted utilize of user , communicator */ }; strategy.cpp: #include...

nodes - Prolog - Need to understand what a rule is doing -

nodes - Prolog - Need to understand what a rule is doing - i have database total of facts such as: overground( watfordjunction , watfordhighstreet , 2 ). overground( watfordhighstreet , bushey , 3 ). overground( bushey , carpenderspark , 3 ). overground( carpenderspark , hatchend , 2 ). example: watford junction watfordhighstreet takes 2 minutes. i designed rule can test if journey station can done including reverse journeys. isjourney(station1,station2):- overground(station1,_,_), overground(_,station2,_),!; overground(station2,_,_), overground(_,station1,_),!. isjourney(station1,station2):- overground(station1,station3,_), isjourney(station3,station2). isjourney(station1,station2):- overground(station3,station2,_), isjourney(station1,station3). i understand 1st line first checks if station1 , station2 exist in facts. cuts end backtracking 1 time journey found true in order prevent infinite loop. the 2nd line c...

visual studio 2010 - Is it possible to be prompted for VSTO ClickOnce update? -

visual studio 2010 - Is it possible to be prompted for VSTO ClickOnce update? - i've created word add-in 2007-2010 using visual studio 2010, , i'm using clickonce deployment; however, i'd @ to the lowest degree prompt user before performing update, simple "there new version available, update? y/n". i can see non-office clickonce applications have ability, can find nil anywhere doing on office add-ins. see tons of people asking question, nobody seems have answer, , find interesting number of people asking question seems trail off after 2008...does mean there's way go i'm missing? similar question on here check updating solutions section here visual-studio-2010 windows-installer vsto clickonce setup-project

url rewriting - How do I rewrite mysite.com/page/ to mysite.com/page/index.html with NGINX? -

url rewriting - How do I rewrite mysite.com/page/ to mysite.com/page/index.html with NGINX? - how can 301 rewrite mysite.com/page/ mysite.com/page/index.html using nginx? in apache had: rewriterule page/ http://mysite.com/page/index.html [r=301,l] thanks help, hydn try settings: location / { rewrite /page/ http://mysite.com/page/index.html permanent; ... } url-rewriting nginx

html - CSS property width: 100%; make a page longer -

html - CSS property width: 100%; make a page longer - i have totally simple layout, in page silver background , reddish div, possible see on image below. problem is, when add together reddish div layout page, page longer on length 100% (bottom on right corner - slider). problem caused this? the css properties of reddish div are: html, body { background-color: silver; margin: 0; padding: 0; } .red-div { overflow: hidden; width: 100%; position: absolute; top: 0; left: 0; } .red-div { overflow: hidden; position: absolute; top: 0; left: 0; right:0; /* need */ } that way, can forcefulness go end of browser. when 100%, not business relationship scrollbars. add together space , annoying side-scroll css html width css-position

java - Limit number of bytes written in a PrintStream -

java - Limit number of bytes written in a PrintStream - i'm running unsecure code have set stdout , stderr streams filestream s wrapped in printstream s. (standard output/error must redirected.) is there way configure redirected filestream s/ printstream s set maximum of 10 mb written, that, example, while (true) system.out.write("lots of bytes"); doesn't write excessive amounts of info server's disk. the code does have time limit of 15s, i'd separate guard here. one way define filteroutputstream wrap file stream in, keeps internal counter increments on every write , , after reaching set threshold, starts throwing exceptions or ignores writes. something along lines of: class="lang-java prettyprint-override"> import java.io.*; class limitoutputstream extends filteroutputstream{ private long limit; public limitoutputstream(outputstream out,long limit){ super(out); this.limit = limit; } ...

google chrome - Invoke a specific browser by URL -

google chrome - Invoke a specific browser by URL - let's have specific url link , default browser safari. there anyway url opened using chrome instead of default browser passing parameter in url or other way? note not want alter default browser chrome. the general way solve problem ask, "how can launch chrome specific url?" trying on machine, command line chrome http://stackoverflow.com does it. so, need to: locate chrome.exe on user's machine launch chrome command line parameter of url want load update: upon rereading question, see user browsing in safari , wants click on link in safari , open chrome. no, there isn't way changing html. above reply apply desktop programme wants launch chrome specific url. google-chrome browser

html - Why is my HREF address being changed -

html - Why is my HREF address being changed - my question relates url / site, www.ramm.co.nz/manuals/ramm%20training%20videos/index.htm#25479.htm if scroll downwards bottom on page , have @ links next text 'download videos'. one of links this, <a href="http://www.ramm.co.nz/manuals/ramm training videos/introduction ramm patrol/introductiontorammpatrol.mp4">"mp4"</a> but when hover on link in browser address, http://www.ramm.co.nz/manuals/ramm%20training%20videos/index.htm#introduction%20to%20ramm%20patrol/introductiontorammpatrol.mp4 note 'index.htm#' has been set in there? ideas? i notice original page has url ending in this, blah/index.htm#25479.htm what mean 'index.htm#25479.htm' ? 2 different html files. html

jquery - Why does the toggling of the class just work partially for a few elements and not always the same? -

jquery - Why does the toggling of the class just work partially for a few elements and not always the same? - i have tried implement picklist 1 in primefaces jquery , jquery-ui. to combine multiselect , sortable have function toggles class onclick , allows user select multiple elements using ctrl-button. sorting, selecting , moving in between lists works fine have implement same functionality have drag , drop using buttons. now problem if illustration move item (with button!) toggling doesn't work anymore or partially. can help me? i created fiddle this, functions buttons arent't called , don't know why. http://jsfiddle.net/p59vj/14/ edit: fiddle less code: http://jsfiddle.net/p59vj/15/ my code: javascript/jquery: var selectedlist = new array(); var selectedchoice = new array(); var selected = new array(); jquery(function() { jquery('#liste, #auswahl').sortable({ connectwith:".ui-picklist-list", });...

java - Generate tables from entities in IntelliJ 11 IDEA -

java - Generate tables from entities in IntelliJ 11 IDEA - are there no alternative generate tables entities in intellij? using jpa , eclipselink implementation. trying generate tables mysql. see options importing. do have utilize eclipse generate tables? i believe not possible in intellij. far remember project 1.5 years ago, didn't utilize exporting database, done automatically upon deploy jboss. hope helps. java java-ee jpa intellij-idea

jquery.jcarousel - Resize height per li? -

jquery.jcarousel - Resize height per li? - i have jcarousel library , have rotating box, works intended...my problem is..the whole container height of longest li... (for illustration 800px) - when viewing little li (say content 150px height) - there's massive gap below before seeing other content below jcarousel. so question is: is there way show height of li when on li..rather setting longest li within container/jcarousel. jquery

How to correctly get current loop count from a Iterator in scala -

How to correctly get current loop count from a Iterator in scala - i looping on next lines csv file parse them. want identify first line since header. whats best way of doing instead of making var counter holder. var counter = 0 (line <- lines) { println(csvparser.parse(line, counter)) counter++ } i know there got improve way this, newbie scala. try zipwithindex : for (line <- lines.zipwithindex) { println(csvparser.parse(line._1, line._2)) } @tenshi suggested next improvement pattern matching: for ((line, count) <- lines.zipwithindex) { println(csvparser.parse(line, count)) } scala

c# - How to create new components in Visual Studio 2010 -

c# - How to create new components in Visual Studio 2010 - can tell me how create new visual component .net 4.0 in visual studio 2010, have book component creation in russian language (pavel agurov -razrabotka komponentov v ms visual studio 2005/2008), methods in book covers vs 2005 , 2008. , methods gives errors in vs 2010. edit: there code public partial class excombobox : combobox { /*public excombobox() { initializecomponent(); }*/ private system.collections.specialized.stringcollection _itemvalues = new system.collections.specialized.stringcollection(); [designerserializationvisibility(designerserializationvisibility.content)] [editor("system.windows.forms.design.stringcollectioneditor,system.editor","system.drawing.design.uitypeeditor,system.drawing")] public system.collections.specialized.stringcollection itemvalues { { homecoming _itemvalues; } set { ...

web services - How to handle .Net XML serialization exception? -

web services - How to handle .Net XML serialization exception? - i working on project utilizes .net api (several .net dlls) provided customer. have built application based on api. application works expected on machines. when tried deploying on client’s machine fails rather generic exception. tried googling exception nil conclusive found. to give rough thought api, wraps web service consumer , hence requires marshaling of method parameters xml (no source code available this). next stack trace exception:- system.invalidoperationexception: there error generating xml document. ---> system.argumentexception: string cannot have 0 length. @ microsoft.xml.serialization.generatedassembly.xmlserializationwriterstreaminformation.write5_streaminformation(object o) --- end of inner exception stack trace --- @ system.xml.serialization.xmlserializer.serialize(xmlwriter xmlwriter, object o, xmlserializernamespaces namespaces, string encodingstyle, string id) ...

javascript - how to get a CSSStyleSheet object from a HTMLStyleElement element -

javascript - how to get a CSSStyleSheet object from a HTMLStyleElement element - is possible cssstylesheet object ( document.stylesheets[0] ) htmlstyleelement ( document.createelement('style') ) ? i dynamically add together css rules not-inserted-in-the-document-yet <style> element. you can add together rules before add together style element document. a couple notes- older ie browsers cannot add together kid nodes style element, assign element's stylesheet.csstext property them. create sure append new element head of document. function addstyle(css, media1, title1){ var el= document.createelement('style'); el.type= 'text/css'; if(media1) el.media= media1; if(title1) el.title= title1; if(el.stylesheet) el.stylesheet.csstext= css;//ie else{ el.appendchild(document.createtextnode(css)); } //return el without next line if want append later homecoming document.getelementsbytagname(...

Django admin overwriting fieldsets -

Django admin overwriting fieldsets - suppose have 1 class in model several other classes inherited. define admin class command layout in admin interface. we can create other admin classes inherite (just did in model), how can overwrite fieldsets add together new values? example: in model file: class a(models.model): field1 = models.textfield(..) field2 = models.textfield(..) class b(a): field3 = models.textfield(..) in admin file: class a_admin(admin.modeladmin): fieldsets = ( (none, { 'fields': (( 'field1', 'field2')) }), ) class b_admin(a_admin): pass # here notice takes fields a_admin, add together field 3 without rewriting fieldsets admin.site.register(a, a_admin) admin.site.register(b, b_admin) the resulting fieldsets : ( (none, { 'fields': (( 'field1', 'field2')) }), ('specific b', { 'fields...

c# - File.SetAttributes() not working on USB key as expected -

c# - File.SetAttributes() not working on USB key as expected - fileattributes attrs = file.getattributes( path); file.setattributes( path, fileattributes.hidden ); attrs = file.getattributes( path); this code snippet works on ntfs file scheme (c:\temp...\whatever_file). when seek perform same operation on usb key (fat file system) never sets hidden attribute. if manually set in windows explorer, first line returns correctly set. 3rd line (checking it) never sets if not set. i'll give free puppy whoever can tell me why. :) update: when doesn't work, mean when go windows explorer , @ file doesn't have hidden attribute set. in fact, when sec getattributes shows bit set. in windows explorer not set. if remove usb key , reinsert sure refreshes correctly. thank input, neglected @ rest of code recursively turn off read-only attribute on of files i've written usb key, negating whatever i'd done before. i repent in dust , ashes. c# usb ...

c# - WindowsIdentity.Impersonate in ASP.NET randomly "Invalid token for impersonation - it cannot be duplicated" -

c# - WindowsIdentity.Impersonate in ASP.NET randomly "Invalid token for impersonation - it cannot be duplicated" - i have asp.net app requires users sign in domain accounts using basic authentication. user can create selection, press button. at point after pressing button code: windowsidentity.impersonate(useridentity.token) . useridentity of type windowsidentity, , set (windowsidentity)user.identity. useridentity stored session variable, , think that's because, after button pressed, page containing code called via ajax. when nail code, works 2/3 of time, 1/3 of time, exception: invalid token impersonation - cannot duplicated. think biggest head scratcher me why work not other times? on sessions, works several times before failing. on others, fails right away. here's stack trace: at system.security.principal.windowsidentity.createfromtoken(intptr usertoken) at system.security.principal.windowsidentity..ctor(intptr usertoken, string authtype,...

html - PHP $_POST not working? -

html - PHP $_POST not working? - this question has reply here: php post not working 6 answers i have simplest form possible , want echo whatever written in text box. html: <form action="" method="post"> <input type="text" name="firstname"> <input type="submit" name="submit" value="submit"> </form> php: if(isset($_post['submit'])){ $test = $_post['firstname']; echo $test; } the problem it's not working on server (it works on server). has thought wrong? there other forms on server , working fine. a few thing do: make sure "action" attribute on form leads right destination. try using $_request[] instead of $_post, see if there change. [optional] seek including both 'name' , 'id' attribute e.g. ...

html - How can I get element state from appendchild checkbox in Javascript? -

html - How can I get element state from appendchild checkbox in Javascript? - i creating checkboxes through appendchild. want able check state. know format supposed document.form.checkboxname.value no matter combination of form name or checkbox name utilize doesn't give me response. var myparagraph=document.getelementbyid("myline"); myform = document.createelement("form"); myform.setattribute("name", "myform2"); mytable = document.createelement("table"); var cb_delete = document.createelement('input'); cb_delete.type = "checkbox"; cb_delete.name = "cb_test"; cb_delete.setattribute("name", "cbtest2"); cb_delete.value = 2; cb_delete.onclick = answer; thecell.appendchild(cb_delete); to recap want reply function give me alert if checkbox checked or no...

security - Ajax giving Acess Denied error -

security - Ajax giving Acess Denied error - i trying ajax request 192.158.110.129:5000 (flask webserver), while whole website served 192.168.110.129:8080(apache). access denied error in browsers . how can resolve ? need understand whats happening , can prepare . document.domain="192.168.110.129" in firefox . think cross site script injection security measure can clarify ? there isn't much code can show using api's. this. have html textarea loaded ckeditor script . access through apache . spell checking modified plugin , sending request flash web server . request = "192.158.110.129:5000?data=data" var data=ckeditor.ajax.load(request); this doesn't through . so file serving through apache , ajaxing flash server python action . someone suggested 'proxy' or jsonp solutions . can read on that ? xhr requests restricted same-origin policy allows requests within same origin due security reasons. 192.168.110.129 allowed send xhr ...

regex - keyword highlight is highlighting the highlights in PHP preg_replace() -

regex - keyword highlight is highlighting the highlights in PHP preg_replace() - i have little search engine doing thing, , want highlight results. thought had worked out till set of keywords used today blew out of water. the issue preg_replace() looping through replacements, , later replacements replacing text inserted previous ones. confused? here pseudo function: public function highlightkeywords ($data, $keywords = array()) { $find = array(); $replace = array(); $begin = "<span class=\"keywordhighlight\">"; $end = "</span>"; foreach ($keywords $kw) { $find[] = '/' . str_replace("/", "\/", $kw) . '/iu'; $replace[] = $begin . "\$0" . $end; } homecoming preg_replace($find, $replace, $data); } ok, works when searching "fred" , "dagg" sadly, when searching "class" , "lass" , "as" strikes real ...

Recommendation for a .NET Desktop Client using a PHP web backend? -

Recommendation for a .NET Desktop Client using a PHP web backend? - we have project integrate .net application client communicate end server on http using php. i've been looking @ our options , i've come 2 possible development scenarios: use or post parameters php end, , returning responses using json or in other format .net can interpret. implement .net compatible php web service framework. the first 1 seem far simpler implement, might have complications downwards line, , i'm still not sure format easiest implement. 1 i've done before json. the sec alternative seems "correct" way it, not i've attempted before , unsure best way proceed is. my questions follows: what standard way implement such solution? if alternative 1 recommended way, best format serializing info beingness return? if alternative 2, recommended framework implement solution , there tutorial followed ease implementation? in past, i've gone altern...

telerik - OnLoad event when child RadWindow appears (or reappears without reload) -

telerik - OnLoad event when child RadWindow appears (or reappears without reload) - i have website running asp.net , telerik controls. have parent window button when clicked on, opens telerik radwindow popup. works fine. when close kid radwindow , click button 1 time again displays radwindow 1 time again fine, want able refresh updatepanel in kid window, opposed total postback .reload() method (but cause postback browser popup). is there event in kid radwindow gets fired when displayed (not loaded). alternatively, can fire event in kid window, parent window. generally radwindow seperate page or user command , gets re-loaded everytime open it. parent page can phone call javascript function in radwindow accessing radwindow object radwindowmanager on parent page: //this function belongs in parent page function updateradwindow() { var radwindow1 = getradwindowmanager().getwindowbyname("radwindow1"); radwindow1.get_contentframe().contentwindow....

Use jQuery Deferred inside plugin to always call cleanup method -

Use jQuery Deferred inside plugin to always call cleanup method - i'm writing jquery ui plugin. within plugin, when action occurs, i'm invoking 1 of plugin options callback. 1 time callback completed, want run cleanup code. to more specific, plugin uses jquery ui draggable , droppable. on droppable drop, invoke function defined in options called update. after update called, ajax call, want perform cleanup. don't want user of plugin required perform cleanup call; want cleanup phone call happen automatically after update ajax method successful. i thought using jquery's deferred made sense here. here's code plugin's drop implementation: self.connectedlists = $(self.options.connectwith) .not(self.list) .droppable({ hoverclass: 'ui-selectablelist-active', drop: function(e, ui) { var sender = $(ui.draggable).closest('ul'), deferred = self.options.update.call(self, e, { ...

Error with return in Java? -

Error with return in Java? - i error in code part of code: public boolean findcustomer(string inpersonalnumber){ // check if personal number exist (int i=0; i<customerlist.size();i++) { if(customerlist.get(i).getcustomerpersonalnumber().equals(inpersonalnumber)){ homecoming true; } } homecoming true; } when remove first homecoming true , instead lastly homecoming true, don't error in eclipse code, why can't have first place , same? thanks! edit: error message eclipse say: method must homecoming result of type boolean. i'm confused because isn't have done?! yes, break must in code can write method in other way? edit number 2 why isn't code working? public boolean findcustomer(string inpersonalnumber){ // check if personal number exist (int i=0; i<customerlist.size();i++) { if(customerlist.get(i).getcustomerpersonalnumber().equals(inpersonalnumber)){ homecoming true; ...

java - parsing error when sending double from android to php with hessian -

java - parsing error when sending double from android to php with hessian - i want send double value android client php server using hessian either writedouble function on client or parsedouble function on server has error. (we transmit many different info types correctly, double give problem :)) the double values longitude , latitude example: sent android client: 14,30485725402832 received @ server: 1.0474191691834e-321 android encoding: public void writedouble(double value) throws ioexception { long bits = double.doubletolongbits(value); os.write('d'); os.write((byte) (bits >> 56)); os.write((byte) (bits >> 48)); os.write((byte) (bits >> 40)); os.write((byte) (bits >> 32)); os.write((byte) (bits >> 24)); os.write((byte) (bits >> 16)); os.write((byte) (bits >> 8)); os.write((byte) (bits)); } php decoding: function parsedouble($code, $num){ $bytes = $this->read(8); ...

labview - Detect limit switch reached -

labview - Detect limit switch reached - i'm having little bit of problem labview 6.x concerning motion command stuff. how observe whether limit switch has been reached? far haven't found way that. i'm trying observe minimum , maximum position of attached device. that, initiate motion using "load target position" und "start movement" (don't recall exact name of latter). now, if position reaches limit, motion stops. how observe stopped because physical limit has been reached? tried using error output, tells me there no error, although displays message box telling me limit in direction of travel has been reached. tells me warning 70026. number doesn't appear anywhere else, particularly not in error code expected be. hope made clear i'm trying accomplish , grateful help on that. in advance. for completeness sake: looking wrong property, 'enabled' means device equipped limit switch , 'listening' it. active means ...

All matches of regex in Haskell -

All matches of regex in Haskell - according number of tutorials (including real world haskell) 1 can, using ghci following ghci > :m text.regex.posix ghci > "foo foo foo" =~ "foo" :: [string] ["foo","foo","foo"] yet, when effort this, yields no instance (regexcontext regex [char] [string]) arising utilize of `=~' possible fix: add together instance declaration (regexcontext regex [char] [string]) in expression: "abc" =~ "ab" :: [string] in equation `it': = "abc" =~ "ab" :: [string] what right way of obtaining list of matches in haskell? the regex libraries can confusing overloaded homecoming types, matches need ensure homecoming type alltextmatches , example: prelude> :m + text.regex.posix prelude text.regex.posix> getalltextmatches $ "foo foo foo" =~ "foo" :: [string] ["foo","foo","foo"] ...

java - Android multiple labels -

java - Android multiple labels - i'm new android programmer pardon me basic question, found valid reply more efficient , utilize improve method want inquire on forum. i want place 30 labels on 1 page. these might contain 1-2sentences, efficient way scroll through these without making them clickable button. improve if can create in java, right? because utilize array store different sentences. thanks, all. the listview want in memory efficient way. see more info on here java android

jquery ui - Jqgrid - How to retain the hovered style when using context menu for a row -

jquery ui - Jqgrid - How to retain the hovered style when using context menu for a row - in jqgrid when hover mouse on row highlights row. when utilize context enu, highlighted style gone row. now users not aware row context menu opened for. know if can retain hovered style. know can setselect on grid selected row, don't want select row. in advance... i suggest utilize mouseover , mouseleave (or jquery.hover event same) set ui-state-hover class on row on context menu opened. in way can prepare behavior standard to following: the demo demonstrate suggestion live. corresponding code included below: $grid.contextmenu('mymenu1', { bindings: { edit: function (trigger, currenttarget) { $(trigger).jqgrid('editrow', $(currenttarget).closest("tr.jqgrow").attr('id'), true); }, del: function (trigger, currenttarget) { $(trigger).jqgrid('delgrid...

iphone - how to inserting data after completion of inserting and updating the data -

iphone - how to inserting data after completion of inserting and updating the data - i developing 1 application. in iam facing problem @ inserting info database. first insert , update performed well. after updating if want perform insert operation app crashed. code inserting , updating below +(bool)update:(calendarinfo*)clinfo { nsstring *query = [nsstring stringwithformat:@"update abc set = '%@' b =%d , c=%d",clinfo.a,clinfo.b,clinfo.c]; sqlite3_stmt *ststatement; if(sqlite3_prepare_v2(database, [query utf8string], -1, &ststatement, nil)==sqlite_ok) { if(sqlite_done == sqlite3_step(ststatement)) nsassert1(0, @"error while inserting data. '%s'", sqlite3_errmsg(database)); else nslog(@"updation successful"); } homecoming 0; } +(bool)insert:(calendarinfo*)clinfo{ sqlite3_stmt *addstmt = nil; sqlite3 *contactdb; nsarray *docpatharr = nssearchpathfor...

Facebook Insights api to my web app -

Facebook Insights api to my web app - i having problem figuring out how facebook insights business page dashboard of little web app build. i have tried facebook docs , searched tutorials. find cant seem working. could help code past page me started. something breakdown of female , male visitors lastly month. https://graph.facebook.com/100001972416707/insights/page_impressions_by_city_unique/week/?access_token=qwertyui&since=1315699200&until=1320796800 i have tried above link page error { "error": { "message": "invalid oauth access token.", "type": "oauthexception" } } not sure access_token, got 1 https://developers.facebook.com/docs/reference/api/insights/ did not work also. i grateful if can set me on right path, thanks. you have request access_token via oauth process: http://developers.facebook.com/docs/authentication/ api facebook-graph-api

facebook - Policy query - iframe app posting to multiple (5) friends wall -

facebook - Policy query - iframe app posting to multiple (5) friends wall - after advice. i have client wishing have app lets them download voucher redeem in store after post details of offer onto 5 friends' walls. my understanding of current facebook policy suggests that: 1) promotions can't require users take action on facebook other page (likegate); 2) messages posted multiple friends @ 1 time should unique , initiated - i.e. app shouldn't mass post multiple users. instead users should share things on own wall.... am right in understanding? if so, can point me @ relevant facebook policies - can't seem find them on site. yes, read on policies page. absolutely sure, should have corporate attorney read them , consult you. see http://developers.facebook.com/policy/ , http://www.facebook.com/promotions_guidelines.php facebook publishing policy promotions

How big is the LLVM and Clang source? -

How big is the LLVM and Clang source? - i'm living in third-world country , net connection has limited monthly info allocation. i'd download llvm , clang source not if it's huge. have rough thought (e.g. nearest order of magnitude) how much info svn checkout of source use? from llvm webpage: llvm source code (9.9m) clang source code (6.9m) llvm

android - I have a two imageView in a Relative Layout. Is it possible to change the Position of one imageview dynamically. while the other remain constant.? -

android - I have a two imageView in a Relative Layout. Is it possible to change the Position of one imageview dynamically. while the other remain constant.? - i have 2 image views defined in xml. want alter position of 1 of them dynamically while other remains constant.?? suggestions. thanx. yes off course, damn possible.use layouparam imageview img1=(imageview) findviewbyid(r.id.imageview); imageview img2=(imageview) findviewbyid(r.id.imageview); relativelayout.layoutparams lp2=new relativelayout.layoutparams(100, 100); lp2.addrule(relativelayout.align_right,img2.getid()); img1.setlayoutparams(lp2); setting margin lp2.setmargins(left, top, right,bottom); android android-layout android-widget

c# - Thumbnail library for .NET -

c# - Thumbnail library for .NET - i'm looking thumbnail library .net. don't care if free or paid. generate thumbnails file preview, supporting many file types possible: images, videos, pfd, office docs, ... could recommend any? thanks in advance from experience don't think there's 1 stop shop want. instead you'll need utilize series of libraries accomplish result: pdf: i've used pdf sharp pretty free. video: this question there's http://www.codeproject.com/kb/audio-video/avifilewrapper.aspx alternatively seek more general approach (although i've not used myself) c# .net thumbnails

What are the pros and cons of Object and Merge Drawing Modes in Flash? -

What are the pros and cons of Object and Merge Drawing Modes in Flash? - i've started learning flash , understand there 2 types of drawing modes: object , merge. i understand differences in practicality, illustrated image (merge): but reasons using merge (where above happens) , object, retain total control? object mode slower render? result in larger file sizes? should 1 work in object mode begin with, , seek merge used graphics close optimization? thanks help... say, i'm beginner! flash

xml - Android design - RelativeLayout (background color) -

xml - Android design - RelativeLayout (background color) - i've next relativelayout improve it. (make nice design) <?xml version="1.0" encoding="utf-8"?> <relativelayout android:id="@+navigate/rlayout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ababab" xmlns:android="http://schemas.android.com/apk/res/android" > <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:textsize="10dp" android:textstyle="bold" android:id="@+id/hcorpo" android:layout_centerhorizontal="true" android:src="@drawable/hcorpo" android:layout_margintop="15dp" />. <textview android:layout_width="wrap_content" android:layout_heigh...