Posts

Showing posts from August, 2013

ios - Create the entities programmatically in core data model in iPhone during runtime -

i want create entities in core data model during runtime programmatically in iphone application . don't know how create custom entities during runtime . plz me . the apple documentation has numerous, extensive examples of doing this. please search in xcode 'core data'. example code: iphonecoredatarecipes, coredatabooks, threadedcoredata

windows installer - Create an msi for jre by using wix which is to install jre files in my package? -

i have jre files used mypackage.msi. want create jre.msi msi called mypackage.msi. mypackage.msi created using wix files. please me in this... need wix script above mentioned.... package uses install script files called wix.... you won't able call jre.msi within mypackage.msi can have 1 msi transaction running @ once. either place jre files within mypackage.msi or create burn bootstrapper chain msi's together. check wix chm included on install of wix.

android - Showing cannot open file -

this code download , open file sdcard. but after downloading file, when click on file open it, shows toast message: cannot open file please tell me error. package com.pdf; import java.io.file; import android.app.activity; import android.content.activitynotfoundexception; import android.content.intent; import android.net.uri; import android.os.bundle; import android.webkit.webview; import android.widget.toast; public class pdffileactivity extends activity { webview webview; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); webview = (webview) findviewbyid(r.id.webview); string pdf = "http://officeofthemufti.sg/maulidbooklet.pdf"; webview.loadurl("http://docs.google.com/gview?embedded=true&url=" + pdf); setcontentview(webview); file file=new file("/sdcard/maulidbooklet.pdf"); if (file.exists()) ...

windows 8 - Metro style app media capture exception -

i'm writing first metro-style app. days ago i've written code taking photos based on sample ( here ) , works. release of windows 8 release preview , visual studio 2012 release candidate, same snippet doesn't work. seems there problem access camera in package.appxmanifest i've checked webcam capability. the xaml : <canvas x:name="previewcanvas1" width="320" height="240" background='gray'> <image x:name="imageelement1" width="320" height="240" visibility="collapsed"/> <captureelement x:name="previewelement1" width="320" height="240" /> </canvas> <stackpanel orientation="horizontal" margin="20" horizontalalignment="center"> <button width="120" x:name="btnstartpreview2" click="btnstartpreview_click" isenabled="true" margin="0,0,10,0" background=...

Regex issue in IOS Program -

i trying following regex work on ios in order make sure user inputting numbers , dot. not able number of matches above 0. have tried nsrange 1 , give me 0 no matter well, regex not working, thought pretty sure should have there. suggestions. the code wrote here errorregex defined in .h file , regerror defined well. errorregex = [nsregularexpression regularexpressionwithpattern:@"[^0-9.]*" options: nsregularexpressioncaseinsensitive error:&regerror]; nsuinteger rangeoffirstmatch = [errorregex numberofmatchesinstring:servamount1tf.text options:0 range:nsmakerange(0, [servamount1tf.text length])]; why not use stock-standard c's regex.h ? see example here: http://cboard.cprogramming.com/c-programming/117525-regex-h-extracting-matches.html and more information here: https://stackoverflow.com/a/422159/1208218

robotframework - How to use database library with Robot Framework on temporary sql server -

i using robot framework's database library supports database validation. i tried execute basic command: ***variables*** ***settings*** suite setup suite teardown test setup test teardown library databaselibrary ***testcases*** uc_db_validation to connect database i'm using: dbapimodulename=mysqldb dbname='bigetestsrv' dbusername='ravitest' dbpassword='welcome' dbhost='10.73.92.18' when running connection string command prompt using pybot following error: "no module named mysqldb" i using query express valid credentials , not have sql server installed in machine. how can connect db? i got ..... i approaching in wrong way database library (apache license) http://franz-see.github.com/robotframework-database-library/ using tested postgresql using psycopg2, may or may not work other rdbms. tried connect pymssql db, supporting bydefualt , worked. i used connect database using custom params pyms...

typo3 indexed search Is it possible to show access-restricted pages in typo3 to non-logged-in users? -

i want show results access-restricted page non-logged users also, possible special class or text showing if registers can more content. i found show.forbiddenrecords in typo3 property not working... im using typo3 4.7 did try config.typolinklinkaccessrestrictedpages = <id of login page> ? check typoscript reference.

regex - Regular expression for selecting single spaced phrases but not whitespace -

i need rather complicated regular expression select words 1 space between them , can include '-' symbol in them, should not select continuous whitespace. 'kenedy john g jr e' 'example' 'd-54' i have tried following regular expression: \'([\s\w-]+)\' but selects continuous whitespace don't want do. i want expression select 'kenedy john g jr e' 'example' 'd-54' perhaps, \'([\w-]+(?:\s[\w-]+)*)\' ? edit if leading/trailing dashes (on word boundaries) not allowed, should read: /\'(\w+(?:[\s-]\w+)*)\'/

document - SOLR 3.6.0, After a full re-index of a bunch of entities, some of my items are not making it into the SOLR index, but no logs are being generated -

use streamingupdatesolrserver, used following algorithm re-index huge dataset solr. initialize streamingupdatesolrserver server = new streamingupdatesolrserver(solrserverurl, numdocstoaddinbatch, numofthreads); each item… -->create document -->server.add(document) when finished, server.commit(); server.optimize(); the problem: some of items not making solr index, no logs being generated tell me happened. i able find of documents, missing. no errors in logs – , have substantial try/catch blocks logs around solrj exceptions on clients site. verify logging not being hidden solr war you want verify solr server log settings not hiding fact documents failing added index. because solr uses slf4j api, solr server over-riding log settings allowing see error message when document failed indexed. if have custom {solr-war}/web-inf/classes/logging.properties, need make sure settings not such hiding error messages. by default, errors in adding item should shown ...

asp.net mvc 3 - MVC 3 field mandatory if another field is filled -

i have simple question. i have example 2 fileds mapped on model ex: textbox_1 , textbox_2. i whant ask if exist way (ex mandatory decorator) imposes textbox_2 mandatory if fill textbox_1. if not fill textbox_1 textbox 2 optional. is there elegant way ? there no out of box solution in asp.net mvc this. here attribute created solve it. there 3 available usages attribute: pass null targetvalue constructor: required when dependent field null. pass value tagetvalue : required when dependent field equals passed in value. pass "*" tagetvalue : required when dependent field populated. in case need pass "*" targetvalue constructor, meaning dependent property can non null value. note : contains both, server , client side (+ unobtrusive) validation. server side attribute class: public class requiredifattribute : validationattribute, iclientvalidatable { protected requiredattribute _innerattribute; public string dependentproperty {...

sql server - Mixing date frequencies in SQL -

i have query below: select s1.datadate, s1.prccd, c.ebit sec_dprc s1 left outer join rdq_temp c on s1.gvkey = c.gvkey , s1.datadate = c.rdq s1.gvkey = 008068 order s1.datadate i trying create rolling calculation between 2 columns, prccd column daily prices , ebit column quarterly value. want able calculate product of two, i.e prccd*ebit everyday ebit changes once quarter on random dates. summarizing, want able calculating product of ebit , prccd going forward using new values of ebit when change each quarter randomly datadate prccd ebit 1984-02-01 00:00:00.000 28.625 null 1984-02-02 00:00:00.000 27.875 null 1984-02-03 00:00:00.000 26.75 420.155 1984-02-06 00:00:00.000 27 null 1984-02-07 00:00:00.000 26.875 null . . . datadate prccd ebit 1984-05-02 00:00:00.000 30.75 null 1984-05-03 00:00:00.000 30.875 null 1984-05-04 00:00:00.000 30.75 null 1984-05-07 00:00:00.000 31.125 499.228 1984-05-08 00:00:00.000 31.75 null . ....

How to download and parse a csv file in Racket? -

how download , parse csv file in racket? use get-pure-port download file, , use planet library (require (planet neil/csv) ) parse it. the following example downloads , parses csv file containing data on size of various galapagos islands , how many species found on each island. #lang racket (require (planet neil/csv:1:=7) net/url) (define galapagos-url (string->url "http://www.stat.washington.edu/~handcock/536/data/galapagos.csv")) (define make-galapagos-csv-reader (make-csv-reader-maker '((separator-chars #\,) (strip-leading-whitespace? . #t) (strip-trailing-whitespace? . #t)))) (define (all-rows url make-reader) (define next-row (make-reader (get-pure-port url))) (define (loop) (define row (next-row)) (if (empty? row) '() (cons row (loop)))) (loop)) (all-rows galapagos-url make-galapagos-csv-reader) the first rows returned are: '(("island" "observed....

syntax error - makefile is missing separator -

alright stuck on , have no idea doing wrong. going great working on more complicated makefile of sudden got "missing separator" error. able isolate down simple scenario: test.mk define push_dir $(info ${1}) endef define pop_dir $(info ${1}) endef define include_submake $(call push_dir,${1}) $(call pop_dir,${1}) endef simple include test.mk initial_submake:= includeme.mk $(call include_submake,${initial_submake}) process: @echo processed... and output: c:\project>make -f simple process includeme.mk includeme.mk simple:4: *** missing separator. stop. includeme.mk not exist. have no idea going wrong here have tried multitude of things. if surround call include_submake in info so: $(info $(call include_submake,${initial_submake})) the missing separator error goes away. if in include_submake define call 1 of functions works fine. additionally if directly call functions instead of calling them include_submake works well: include test.mk initi...

jquery - fetching and displaying images, data from external site using JSON? -

i want display them in html web page using json. current code below: beginner dont know json please me need display images in webpage : $(document).ready(function() { var url = 'http://api.dribbble.com/shots/popular?jsoncallback=?'; var params = { format: 'json' }; $.getjson(url, params, function(json) { $.each( json.shots, function(i) { var item = json[i].shots[i]; $('<p> shots: ' + item.player[0].shots_count + 'enter code here'</p>') .append('<a href="' + item.avatar_url+ '"></a>') .append('<img src="' + item.avatar_url + '" />') .appendto('#photos'); return < 2; }); }); }); it looks attempting retrieve jsonp data remote site. visiting url in question, jsonp not returned. after reading the documentation , looks code work if use "http://api.dribbble.com/shots/popular?callb...

commit - Moving committed git files to another directory -

i've been doing development work in 'dev-test' directory , committed files along way. need commit same files differently named directory , remove committed files in 'dev-test' directory. i'm not sure how retain working files. my 'dev-test' repo local, have been doing pulls tracking 'master', have not merged code. can use git reset before first commit of these files other developers have been merging 'master': git reset --soft #commitid your question still bit unclear, want 1 of these: just move files if aren't modifications other files $ git mv dev-test/files other-dir $ git commit -a if test files modifications other files, want diff of work when started until , apply patch other directory. in case wanted second, should have in fact done different thing start. if want test , later apply master, should create branch, work on , if satisfied, merge master branch. if fine, can merge master , have know it. ...

c - Doxygen group module from file -

is possible use doxygen grouping contents of given file grouped together, in doxygen calls "module" ? including c library , in documentation want separate out library without having go through , manually document every item in library group member. i found when using /// style documentation, adding /// \addtogroup /// \{ at start of file, , adding /// \} at end of file works purposes.

objective c - Possible double BIO_free in OpenSSL enc application -

(sorry verbose) experimenting adding openssl support cocoa application written in objective c os x 10.6 (snow leopard). simplify matters, have small wrapper class holds various bio , cipher context structures, aetopensslwrapper. looks following .h @interface aetopensslwrapper: public nsobject { bio *writebio,encbio; evp_cipher_ctx *ctx; unsigned char *readwritebuff; } @property (readwrite,assign) bio *writebio,*encbio; @property (readwrite,assign) evp_cipher_ctx *ctx; @property (readwrite,assign) unsigned char *readwritebuff; -(id)init; ... -(void)dealloc; @end .m @implementation aetopensslwrapper @synthesize writebio,encbio,ctx,readwritebuff; -(id)init { self=[super init]; if(self) { writebio=bio_new(bio_s_file()); encbio=... ctx=... buff=... (error handling omitted) } return self; } @end then various utility methods chain bios, write output bio, flush etc, in particular, 1 -(void)pushencryptingbio chain en...

ios - Objective C unsharp mask filter Xcode -

what efficient way create unsharp mask filter in objective c targeting ios? best implement open source imagemagick or build scratch. i think basic formula follows (please comment if have not gotten right). duplicate original blur duplicate (gaussian) blend original via "difference" use result mask original increase contrast in unmasked areas of original. core image has ciunsharpmask filter built-in, although i'm not sure if it's available on ios yet. brad larson's gpuimage framework has unsharp mask filter. both methods should fast , easier implement cross-compiling imagemagick or writing own.

php - Inline hover on Div -

hi trying run while loop database display number of different records, way record displayed through different images, therefore cannot customize using standard css , doing through inline css, have got point displays each image fine, won't display new image on hover user, here line div concerned <div id="house_wrapper" style="background-image: url(images/houses/<?php print "$house_name";?>.png); :hover{background-image: url(images/houses/<?php print "$house_name";?>_hover.png)};"></div><!---end house_wrapper---> and here code entire while loop <div id="house_summary_content"> <?php $query = mysql_query("select * user_houses user_id='$user_id'"); while($row = mysql_fetch_assoc($query)) : ?> <?php extract($row);?> <?php $sql_house = mysql_query("select * houses house_id='$house_id'"); $house_array = mysql_fetch_...

dynamics crm 4 - CRM Workflow Change Impact -

i have made changes crm workflow in test environment. plan on importing modified workflow production environment , replacing workflow in place. wondering how impact current flow (tasks , incidents) in place , relies on it. tips or process publish modified workflow great. i couldn't find reference online states explicitly, when update existing workflow, workflow instances have started run until completion using old version of workflow .

How to handle exceptions in a multi-layered ASP.NET Web Application -

i have asp.net web forms application ui , service layer , repository layer . some of methods in service layer communicates web service, therefore wrap calls web methods in try-catch-finally construct. suppose have following methods in service layer : public registrationdetails getregistrationdetails(int userid) public bool registeruser(userdata myuserdata) where registrationdetails , myuserdata object types (classes). my concern following: if create try-catch-finally wrap call web service within implementation of methods listed above, in case there exception how can return message string if return types registrationdetails , bool ? i thinking adding property every return object not know if solution. instance instead of using bool : public class registerresponse { public bool isregistered { get; set; } public string exceptionmessage { get; set; } } public registerresponse registeruser(userdata myuserdata) and check if exceptionmessage null or string....

c# - Writing to a new log file each day with TraceSource -

i using logger in application write files. source, switch , listeners have been defined in app.config file follows: <system.diagnostics> <sources> <source name="loggerapp" switchname="sourceswitch" switchtype="system.diagnostics.sourceswitch"> <listeners> <add name="mylistener" type="system.diagnostics.textwritertracelistener" initializedata="mylistener.log" /> </listeners> </source> </sources> <switches> <add name="sourceswitch" value="information" /> </switches> </system.diagnostics> inside, .cs code, use logger follows: private static tracesource logger = new tracesource("loggerapp"); logger.traceevent(traceeventtype.information, 1, "{0} : started application", datetime.now); what have create new log file each day instead of writing same l...

osx snow leopard - java caching files across multiple runs of the same application -

i trying generate data use in report. issue first time run program data set, takes longer process data. rest of times run program data set quicker half time. problem need duplicate results of first run each time. because in reality user never load data set multiple times in row. question how can make java stop caching these files across multiple runs. or mac doing me. also, other way me duplicate first run results restart machine, , not want each time want run test. ideas appriciated. java's not caching files, operating system is. i assume you're working on performance (or else why care?). create many copies of data , load different 1 each time.

.net - Using IDisposable to unsubscribe events -

i have class handles events winforms control. based on user doing, deferencing 1 instance of class , creating new 1 handle same event. need unsubscribe old instance event first - easy enough. i'd in non-proprietary manner if possible, , seems job idisposable. however, documentation recommends idisposable when using unmanaged resources, not apply here. if implement idisposable , unsubscribe event in dispose(), perverting intention? should instead provide unsubscribe() function , call that? edit: here's dummy code kind of shows i'm doing (using idisposable). actual implementation related proprietary data binding (long story). class eventlistener : idisposable { private textbox m_textbox; public eventlistener(textbox textbox) { m_textbox = textbox; textbox.textchanged += new eventhandler(textbox_textchanged); } void textbox_textchanged(object sender, eventargs e) { // } public void dispose() { ...

profile - Suddenly 100% of PayPal Recurring Payment Creations Failing for Visa, MasterCard, Amex -

i'm using php 2 different web sites. sites call paypal's name value paid (nvp) api create recurring payment profiles. a week ago, 40% of attempts create recurring payment profiles visa , mastercard cards started failing. wasn't big deal since, if resubmitted exact same card details immediately, go through. on evening of june 1, 2012, however, of vias/mc/amex profile creations started failing. to determine if in servers, logged onto paypal web site use function create profiles. function failed same errors. paypal returns 10764 error visa/mc , 10752 error amex. used paypal's virtual terminal create direct one-time payments using same cards. of payments successful. so, cards good. if consumer uses discover card or paypal id create recurring payment profile, appears still work. without direct visa, mc and/or amex support, entire business. i've submitted tickets , called paypal account team. vagueness in answering questions has been terrifying. acknowledged p...

Oracle SQL: Conditionally update a table based on comparison with a SQL statement -

i have table (table1) has 4 columns: uid | pid | value1 | value2 i have sql statement (stmt) returns 3 columns other tables: uid | pid | value1 now here condition of how want update table1: first, compare uid , pid pair stmt in table1, for new uid , pid pair not in table1, insert new row stmt table1, set table1.value2 = 0 (i've done one) for existing uid , pid pair in both stmt , table1, do: a. if table1.value2 > 0, update table1.value1 = stmt.value1 b. if table1.value2 = 0 , if table1.value1 != stmt.value1, update table1.value1 = stmt.value1, otherwise nothing. i'm having trouble coming solution condition 2. appreciated! update ( select table1.uid ,table1.pid ,table1.value1 table1_value1 ,table1.value2 table1_value2 ,stmt.value1 stmt_value1 table1 inner join (select ? uid ,? pid ,? value1 whatever) stmt on stmt.uid =...

c - Casting troubles when using bit-banding macros with a pre-cast address on Cortex-M3 -

tl;dr: why isn't (unsigned long)(0x400253fc) equivalent (unsigned long)((*((volatile unsigned long *)0x400253fc))) ? how can make macro works former work latter? background information environment i'm working arm cortex-m3 processor, lm3s6965 ti, stellarisware (free download, export controlled) definitions. i'm using gcc version 4.6.1 (sourcery codebench lite 2011.09-69). stellaris provides definitions 5,000 registers , memory addresses in "inc/lm3s6965.h", , don't want redo of those. however, seem incompatible macro want write. bit banding on arm cortex-m3, portion of memory aliased 1 32-bit word per bit of peripheral , ram memory space. setting memory @ address 0x42000000 0x00000001 set first bit of memory @ address 0x40000000 1, not affect rest of word. change bit 2, change word @ 0x42000004 1. that's neat feature, , extremely useful. according arm technical reference manual, algorithm compute address is: bit_word_offset = (...

c# - Is it possible to write a hash code function for an comparer that matches many-to-many? -

can write hash code function following comparer logic? two instances of my equal if @ least 2 properites (a, b, c) match. the equals part simple, i'm stumped on hash code part, , part of me thinking might not possible. class myothercomparer : iequalitycomparer<my> { public bool equals(my x, y) { if (object.referenceequals(x, y)) return true; if (object.referenceequals(x, null) || object.referenceequals(y, null)) return false; int matches = 0; if(x.a == y.a) matches++; if(x.b == y.b) matches++; if(x.c == y.c) matches++; // match on 2 out of 3 return (matches > 1) } // if equals() returns true pair of objects // gethashcode() must return same value these objects. public int gethashcode(my x) { // ??? } } update : in addition correct answer reed copsey, important point general usefulness of fuzzy comparer stated ethan bro...

android - Filling ListView with AsyncTask (doInBackground() returning cursor) -

i'm trying fill listview using asynctask. included problem in comment private class downloaddatatask extends asynctask<string, void, cursor> { private final progressdialog dialog = new progressdialog(ctx); @override protected void onpreexecute() { this.dialog.setmessage(ctx.getstring(r.string.acquiringdata)); this.dialog.show(); } @override protected cursor doinbackground(final string... args) { dbadapter dbadapter = new dbadapter(ctx); dbadapter.open(); // when call method main class reurns cursor full of values cursor cursor = dbadapter.fetchallitemsinexpenses(); return cursor; } protected void onpostexecute(final cursor cursor) { if (this.dialog.isshowing()) { this.dialog.dismiss(); //cursor empty } ctx context set on main class oncreate() following requests pasting fetchallitemsinexpenses() method: public cursor fetchall...

javascript - Certain HTML Character Entities are HUGE in Firefox Only -

Image
for reason, in firefox 12.0 mac os x, 〉 ( &rang; ) characters larger should be. on chrome , safari, how want them be. i have adddefaultcharset utf-8 in .htaccess <meta charset="utf-8"> in <head> (as group i'm delivering these files may not use .htaccess ). also, according adobe's browser lab, ie 7 , 8 show square box... there can these browsers support character? make things lot easier (as colors going changing, images inconvenient, , no color fade images). demo: http://cameronspear.com/demos/rang/ this see in chrome , expect see: this firefox showing: this screenshot browser labs of ie8: tl;dr: want of these screenshots first 1 using 〉 aka &rang; characters. use of javascript acceptable. thanks. [edit] should specify it's not crucial have &rang; character able change color css , have same across multiple browsers. solution i wanted share did posterity's sake. thanks pointy's tips , resourc...

java - variables and methods and actionlisteners -

i have (partially pseudo)code class { void b() { int d = 0; jbutton c = new jbutton(); c.addactionlistener(new actionlistener() { @override public void actionperformed(actionevent e) { d = 1; } }); } } however, doesn't work, eclipse suggested adding final identifier d, makes value impossible change. sorry if it's stupid question, it's hard form question google this... can't declare variable on lever higher method b. you want move declaration of d outside of method. class { int d = 0; method b() { jbutton c = new jbutton(); c.addactionlistener(new actionlistener() { public void actionperformed(actionevent e) { d = 1; } } } ..and format code.

git svn - Updating a git mirror of an SVN repository -

i created git mirror of svn repository doing: create new repo on github mkdir mirror && cd mirror git svn init [svn url] git svn fetch -rhead git remote add origin [github url] git svn rebase git push origin master this works great, , can update simply: git svn rebase git push origin master however, if move different computer , want update it, tried: git clone [github url] git svn init [svn url] git svn fetch -rhead git remote add origin [github url] git svn rebase but here get: "unable determine upstream svn information working tree history" can explain correct way this? i had same need , found example here: http://rip747.wordpress.com/2009/06/17/reviving-a-git-svn-clone/ to answer in context of question: git clone [github url] cd repo git svn init [svn url] git update-ref refs/remotes/git-svn refs/remotes/origin/master git svn rebase

backbone.js - How do I render DOM-dependent views in a CollectionView? -

i have marionette.collectionview renders list of itemview s. during render() , use itemview's model draw svg using raphael . raphael requires specify height , width canvas, grab this.$el . however, $el (as empty <div> ) has no dimensions until added dom , css rules applied it, need delay rendering until know view in dom. the problem marionette.collectionview doesn't add child view dom until after has rendered. how can override behavior without re-implementing half of collectionview ? sample code // renders single object. var itemview = marionette.itemview.extend({ template: "#item-view-template", onrender: function() { var svgel = this.$el.find("div.svg-canvas"); // raphael needs element's width , height, // 0 until this.$el in dom. var paper = raphael(svgel.get(0), svgel.height(), svgel.width()); // ... draw svg... } }); // renders collection of objects. var listview = marionett...

php - Dropdown Menu to Query Database -

first of apologize if dumb question - i'm starting pick php/mysql skills. i'm making dropdown form 3 dropdowns. want able trigger query form. select part type, make, model hit submit , table of results displayed. i have form populated 3 arrays , when hit submit, can echo key of each selected item page: echo '<form action="dbbrowse.php" method="post">'; $mak = array (0 => 'make', 'ford', 'freightliner', 'peterbilt', 'sterling', 'mack', 'international', 'kenworth', 'volvo'); $mod = array (0 => 'model', 'argosy', 'midliner'); $p = array (0 => 'part', 'radiator', 'charge air cooler', 'ac'); echo '<select name="drop1">'; foreach ($p $key => $value) { echo "<option value=\"$key\"> $value</option>...

Data sharing in Couchbase's memcached implementation between Java and .Net -

i trying share data stored in couchbase memcached bucket between java , .net. i able read string set in java in .net whenever try read string set in .net in java result null. so possible exchange data between .net , java in memcache buckets in couchbase server. thanks reply, figured out. the reason .net able read strings set in java because enyimmemcached library interprets cached item string if not recognize flag. so in order able read strings in java, created own custom transcoder extending spyobject , set in away such ignores flag. pass custom transcoder call this, _obj = getmemcachedclient().get(key, new stringtranscoder()) my stringtranscoder class looks this, /** * copyright (c) 2006-2009 dustin sallings * * permission hereby granted, free of charge, person obtaining copy * of software , associated documentation files (the "software"), deal * in software without restriction, including without limitation rights * use, copy, modify, merg...

javascript - How do I input specific tags by calculating the text length which user input in textarea? -

i'm using customed wysiwyg dhtml editor. editor's usable on desktop. want shown on both desktop , mobile. (and needs specific class of tag , tag.) , got me thingking... desktop(mostly laptops) , mobile devices not same. have different pixels~ if i'm using text data not problem. i'm using specific & tags (their width , height must defined in css pixels) need find way put 2 different type of tags(one desktop,one mobile) 1 incoming input(which user input dhtml editor textarea) calculating text input. ex> .my_div { width: 450px; height: 550px; } .my_div .my_span { width: 350px; height: 530px; ex1> <div class="my_div"><span class"my_span">it's when text user input here more height of 530px....close 1 and... </span></div> <div class="my_div"><span class"my_span">...and in put new div , span tags automatically, reapeatedly until press "end" button close </span...

webproxy - set my own proxy server and pass parameters to it in google chrome -

i want set own web proxy in google chrome web pages server. know can set web proxy server settings want pass parameters server, instead of : 24.33.20.87:8888 want redirect pages here : 24.37.47.30:8888/cgi-bin/mgetpage?tm=567567567&send=0&murl=google.com do have idea how please? in advance you'll have write extension captures each tab , redirects custom url if isn't there. you'll need use tabs api. lets use getcurrent current tab. can it's url , see if document.domain equal 24.37.47.30 . if not, can use window.location redirect to: 24.37.47.30:8888/cgi-bin/mgetpage?tm=567567567&send=0&murl={tab_url} apparently there chrome extensions this. https://chrome.google.com/webstore/detail/odchblbgkkchnldldakeikkjfbkllaah https://chrome.google.com/webstore/detail/lacckjdlmkdhcacjdodpjokfobckjclh

c# - Update Datagridview From Another Form -

first should saw link : how refresh datagridview when closing child form? and did this: (i have datagridview in form1) form1: public void filldatagridview(datatable dt1) { bindingsource1.datasource = dt1; bindingsource1.resetbindings(false); datagridview1.datasource = bindingsource1; //here checked number of rows of dt1 , shows correct value } form2: sqlconnection cnn = new sqlconnection(@"my connection string"); private form1 handled_frm1; public form2(form1 frm1) { initializecomponent(); handled_frm1 = frm1; } private void textbox1_textchanged(object sender, eventargs e) { dt.clear(); using (sqlcommand cmd =cnn.createcommand()) { ...

multiple monitors - Determine windows display number and/or layout via java -

i have fullscreen java app run on 8 monitor digital signage type display on windows 7 machine. need able display content on specific physical monitors. ideally displays ordered 1-8 in display properties -> settings, many attempts of unplugging/plugging in , reordering have failed physical monitors appear in deterministic order via display properties->settings. can reorder them fine, when java program retrieves information on displays not in layout/order windows has them configured. graphicsenvironment id returns strings such device0 , device1, these not match windows display numbering seen in display properties. instance if layout 7,4,1,2,3,4,5,6 still device0, device1... in device0 corresponds identified screen 1 (not 7 first screen on left). there way query os determine layout displays in and/or other technique display fullscreen on specific physical monitor? you can bounds of screens relative big virtual desktop: graphicsenvironment ge = graphicsenvironme...

Developing webservice(json format) for android client using java compatible with appengine server -

i developing student android app uses json webservice. want populate student news or events daily in android application.i can bulid client side procedure. but not able build server side webservice.please give me stemps follow build webservice on server side. my requirements: i want webform can enter student news , events , should stored on webservice(json). webservice must comapatible appengine. please me strucked con't move work.. sorry english. advance thanks. app engine has nice tutorials on website, i'd recommend starting there: https://developers.google.com/appengine/docs/java/gettingstarted/creating i'd create simple form post servlet. don't have send json data, it'd easier send app engine standard post or data, parse it, , want it. if want android app receive json data, i'd recommend looking jackson: http://jackson.codehaus.org/ this library parse java objects , return them json strings, quite nice. good luck!

asp.net - How to parse data from ViewData -

i trying parse data viewdata not going well. controller: public actionresult listfilm() { mediacatalog mediacl = new mediacatalog(); // retrieve list of film media's list<catalogdb.filmmedia> listfilmmedia = new list<catalogdb.filmmedia>(); listfilmmedia = mediacl.getallfilmmediatitles(); viewdata["filmlist"] = listfilmmedia.tolist(); return view(); } view: <% foreach(var item in (viewdata["filmlist"] list<catalogdb.filmmedia>)) { %> <%=item.title %> <% } %> i noticed code written in view file parsed directly in source, reason not being executed code? i use viewbag property, has been added asp.net mvc3. uses dynamic under hood, makes viewbag typed. ( viewdata uses dictionary under hood , returns object , have cast). so basically, instead of using viewdata["mypropery"] mytype , can directly call view...

c# - Who connected remotely? -

we have ten user-names software , due licensing issues, need 10 separate machines (10 different ips). multiple users can remotely access machine @ same time, 1 user can using program on machine. okay, here deal. developing simple application in c# visual shows whether instance of program running on machines (a simple table). works well. thought of adding table column 'owner' - running instance of program on particular machine. can somehow track ip of person remotely logged in , started process? there 1 account on each machine. thanks. what want display owner of respective process, i.e. user name can seen e.g. using task manager or process explorer. one option retrieve owner of process use wmi. e.g. decribed in related question: how determine owner of process in c#? if additionally want retrieve user in rdp session might want have @ cassia library, e.g. using code following: new terminalservicesmanager().currentsession.clientname to client's hos...

python - Creating spreadsheets for download in django -

i using xlrd create spreadsheets. on website, user able create custom report , download xls file. usually, storing files on s3, in case, there way not store file anywhere , give directly user? or how should if don't want use s3 save file? xlrd choice. generation , download processes - depends on web framework in usage, here an example web2py.

python - What tracking solutions are available for server side code? -

i'm working on tracking proxy (for want of better term) written in python. it's simple http (wsgi) application run on 1 (maybe more) server , accepts event data desktop client. service forward tracking data on actual tracking platform (deskmetrics, mixpanel, google analytics) don't have deal slicing , dicing of data. the reason implementation it's easier , faster make changes server process control rather having ensure every client in wild gets updated if tracking backend changes in way. i've been looking info on various options , hoping here have advice own experiences. ideally we'd able use google analytics it's free amount of usage paid options fine. my real requirement either python library or documented api can write wrapper (this seems lacking in ga when comes triggering events through method other js or other provided libs). n.b. we're not tracking server code newrelic isn't appropriate, we're decoupling desktop application s...

javascript - Dynamically group poorly-structured HTML, that has no IDs? -

there old website use , data not displayed in friendly fashion. write userscript (javascript/jquery) assists readability of site. content looks (the html comments own, show this): <font size="3" face="courier"> <br> <!-- begin entry 1 --> name1 (location1) - date1: <br> text1 <br> text1 (continued) <br> text1 (continued) <br> <br> <!-- begin entry 2 --> name2 (location2) - date2: <br> text2 <br> text2 (continued) <br> <br> text2 (continued) <br> text2 (continued) <br> <br> <!-- begin entry 3 --> name3 (location3) - date3: <br> text3 <br> text3 (continued) <br> text3 (continued) <br> <br> <br> text3 (continued) <br> text3 (continued) <!-- below text3, user copied entry1 here --> name1 (location1) - date1: <!-- text3 --> <br...