Posts

Showing posts from September, 2014

How to extend the tinymce validation rules for the style tag? -

i have tinymce editor. in editor want enable user use upper cased keyword inside style tag or html element, e.g. [color]. issue editor converts lower case, means system cannot identify later in order replace it. how can prevent editor edit keyword? i tried external_valid_elements, didn't work. extended_valid_elements: "*[style]" the issue solved replacing lower-cased version of keyword upper case before sending back-end.

java - Spring Repository Rest Resource - issue not saving sub objects -

i have been trying restful interface going spring boot have hit problem. when post'ing following json org.hibernate.transientobjectexception exception (please see below) indicates sub-object not being saved. on hand tracing appears json correctly rendered domain objects when save() method (simplejparepository) called doesn't attempt recurse down through sub-objects. intentional? if so, correct approach configuring @repositoryrestresource such save sub-objects? i have minimal spring.boot application happily provide if diagnosis. i have been looking around working example has sub-object (relation) haven't found 1 yet. spring.io example great getting me going have become bit stuck expanding on it. code snippets follow below: json being posted: { "name" : "test sample group", "description" : null, "projectcode" : null, "creator" : "user001", "createddate" : 1395130128971, "...

Android editText does not setText but gives a nullPointerexception in error log -

hey keep getting null pointer exception whenever try settext on edit text maybe can take @ code , tell me i'm doing wrong public class facilitymap extends fragment { public static final string arg_menu_number = "menu_number"; private displayimageoptions options; edittext editgate, editfreeshops, editnature; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.facility_map, container, false); int = getarguments().getint(arg_menu_number); string titlestring = getresources().getstringarray(r.array.drawer_menu)[i]; getactivity().settitle(titlestring); touchimageview imageview = (touchimageview) rootview.findviewbyid(r.id.imageview2); imageview.setmaxzoom(4); editgate = (edittext) rootview.findviewbyid(r.id.textviewgate); editfreeshops = (edittext) rootview.findviewbyid(r.id.textviewfreeshops); editnature = (editte...

PHP chr() returns diamond question mark from HTML -

i've read lot on subject, since it's quite popular problem, can't find solution... i have html form in it... <html> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <?php header('content-type: text/html; charset=utf-8'); ?> </head> <body> <form method="post" accept-charset="utf-8"> <input type="password" name="pass"> <input type="submit"> </form> </body> </html> ...from password through $_post global , afterwards want split array of ascii values, each of changed standard arithmetic functions (+ / - / * ...) , afterwards changed numbers character ascii table ord function... $password = $_post['pass']; $password = str_split($password); foreach($password $letter) { $letter = ord($letter); ..do algorithmic stuff number get.. $letter = chr($letter); } $pas...

android - Compress video by using FFMPEG -

i tried call c/c++ function in c/c++ file in java file , okay. but don't know how can transfer query string in below c/c++ function` compressing video : ffmpeg -y -i /sdcard/videokit/in.mp4 -strict experimental -s 160x120 -r 25 -aspect 3:4 -vcodec mpeg4 -b 2097152 -ab 48000 -ac 2 -ar 22050 /sdcard/videokit/out.mp4 exactly. what want can compress video using ffmpeg . (i think call via c function in c file) p/s : read many topics, many people issue, no answer satisfied. people know this, please me, thanks, this command converts dozens of api calls in ffmpeg. see option sets what, must read ffmpeg.c file. option use ffmpeg.c, rename main() else, compile program, can call string.

php - Context.io, Response object has protected properties -

i working context.io. able response using php api, however, response object , contains protected properties. response : contextioresponse object ( [headers:protected] => array ( [request] => [response] => ) ) all response object server , need save fields in db. hopefully can give idea

database - Android login Error -

i making login page. in following code, userentered , pswdentered edittext collecting user input. pass userentered parameter in method getsingleentry in database. want method check username in database , return corresponding password back. how method getsingleentry look? boolean diditwork = true; try { string userentered= user.gettext().tostring(); string pswdentered = pswd.gettext().tostring(); string storedpassword=logindb.getsingleentry(userentered); log.d("blahhhhhhhhh", storedpassword); if(pswdentered.equals(storedpassword)) { dialog id=new dialog(login.this); id.settitle("login"); textview tyv=new textview(login.this); tyv.settext("registration successful!"); id.setcontentview(tyv); } else { dialog id=new dialog(login.this); id.settitle...

jquery - how get target children id -

short english... my html <button><span id="popmain"> pop </span></button> $(document).bind({ click : function(evt){ var targetid = evt.target.id; var nodename = evt.target.nodename; } click event chrome ( nodename : span ) click event explorer (nodename : button) when use explorer, want span's id. i try $(this).find('span').attr('id'); $(this).find('span').id; $("#"+evt.target.id).children('span').attr('id'); $("#"+evt.target.id).find('span:first-child').attr('id'); $("#"+evt.target.id).find('span:last-child').attr('id'); but result 'undifined'. t^t plz me... spelling mistake: $(this).find('span').attr('id'); $(this).find('span').id; $("#"+evt.target.id).childeren('span').attr('id'); // children not childeren. $("#"+evt.target.id).find('span:fir...

java - Mybatis <bind> tag cause SAXParseException -

i'm using mybatis in app. i'm using bind tag in select element. mapper code: <?xml version="1.0" encoding="utf-8" ?> <!doctype mapper public "-//mybatis.org//dtd mapper 3.0//en" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="myapp.model.mydao"> <select id="myselect" parametertype="myapp.model.myparameterbean" resulttype="hashmap"> <bind name="sl" value="_parameter.getselectlist()" /> <bind name="tns" value="_parameter.gettablenamesuffix()" /> select name #{sl} mytable_#{tns} </select> </mapper> when try compile app, saxparseexception. detailed error message is: failed parse mapping resource: 'file [c:\myapp\model\mymapper.xml]'; nested exception org.apache.ibatis.builder.builderexception: error creating document i...

mozart - Why doesn't "for X in E1..E2;E3 do" work in Oz? -

i'm using mozart 2.0.0 , i'm following these docs: http://mozart.github.io/mozart-v1/doc-1.4.0/loop/node1.html#chapter.official i'm guessing loop syntax has changed or something, because parse error when following documentation exactly: x in e1..e2;e3 my attempt: for x in 5..1;-1 {browse x} end i got work more verbose syntax: for x in ({length l};x > 0;x - 1) {browse x} end but first example seems way more readable , less error prone me. why doesn't work? i did not test 2.0.0, in 1.4.0 works if replace - ~ . it's bit of unusual oz syntax: unary minus sign ~ . - used binary minus.

Hybrid OpenMP/MPI matrix multiplication -

i matrix multiplication traditional way block, 1 mpi task spawn thread, problem how define send , when receive results openmp. if 1 can me great simple sample great. there different ways can approach problem. 1 break first matrix groups of rows, , send 1 group each rank. there, use openmp parallelize multiplication. finally, recombine results single matrix. using approach, use mpi_send send groups out each rank. assuming rank 0 has full matrix, use like: float a[ndim1*ndim2]; float b[ndim2*ndim3]; float c[ndim1*ndim3]; nrows=ndim1/nranks; (int i=1;i++;i<nranks) { startrow=nrows*i; nelems=nrows*ndim2; if (i==nranks-1) // better ways this, simple example { nelems+=(ndim1%nranks)*ndim2; } mpi_send[&a[startrow], nelems, mpi_float, i, 0, mpi_comm_world); } notice starts rank 1, there's no need send rank 0 itself. we'll have rank 0 working on part of matrix well. to receive in each of ranks, use nelems=nrows*ndim2; if (myrank==nran...

python - how to convert csv to dictionary using pandas -

how can convert csv dictionary using pandas? example have 2 columns, , column1 key , column2 value. data looks this: "name","position" "ucla","73" "suny","36" cols = ['name', 'position'] df = pd.read_csv(filename, names = cols) convert columns list, zip , convert dict: in [37]: df = pd.dataframe({'col1':['first','second','third'], 'col2':np.random.rand(3)}) print(df) dict(zip(list(df.col1), list(df.col2))) col1 col2 0 first 0.278247 1 second 0.459753 2 third 0.151873 [3 rows x 2 columns] out[37]: {'third': 0.15187291615699894, 'first': 0.27824681093923298, 'second': 0.4597530377539677}

java - Lambda expression to convert array/List of String to array/List of Integers -

since java 8 comes powerful lambda expressions, i write function convert list/array of strings array/list of integers, floats, doubles etc.. in normal java, simple for(string str : strlist){ intlist.add(integer.valueof(str)); } but how achieve same lambda, given array of strings converted array of integers. you create helper methods convert list (array) of type t list (array) of type u using map operation on stream . //for lists public static <t, u> list<u> convertlist(list<t> from, function<t, u> func) { return from.stream().map(func).collect(collectors.tolist()); } //for arrays public static <t, u> u[] convertarray(t[] from, function<t, u> func, intfunction<u[]> generator) { return arrays.stream(from).map(func).toarray(generator); } and use this: //for lists list<string> stringlist = arrays.aslist("1","2...

java - Get caps from pipeline -

i new gstreamer , try caps property pipeline in java. if try in command line pipeline gst-launch-0.10 -v --gst-debug-level=2 filesrc location="c:/dokumenty/eclipse/rtsp_test/trailer.mp4" ! decodebin2 ! queue ! jpegenc ! rtpjpegpay ! udpsink host=::1 port=5000 sync=true it works fine , return caps, needed /gstpipeline:pipeline0/gstudpsink:udpsink0.gstpad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)jpeg, payload=(int)96, ssrc=(uint)3175930633, clock-base=(uint)3850186239, seqnum-base=(uint)8531 but dont know, how caps in java pipeline pipe = pipeline.launch("filesrc location="c:/dokumenty/eclipse/rtsp_test/trailer.mp4" ! decodebin2 ! queue ! jpegenc ! rtpjpegpay ! udpsink host=::1 port=5000 sync=true"); are there methods how udpsink0 pipeline? thank you if @ documentation bin (the parent class of pipeline ), you'll see there few ways individual elements. simple way use: bin...

how to use Use Google Authentication for Java webportal with SSO -

i new ga(oauth). i have few queries while using google authentication on java web based portal. 1) how , configure web-portal(e.g. https://abc.xyz.com )? 2) if have 100 user base, in case have create each user's account in order achieve authentication google? if yes how shall map them above portal? 3) have used used http://ocpsoft.org/java/setting-up-google-oauth2-with-java/ there way avoid maintenance of clientid, clientsecret or json @ web application level , can still achieve secure authentication ga? 4) how can implement sso along ga in java web application? appreciated. thanks 1) configure web portal details in https://code.google.com/apis/console/ . using left menu 'api access' > 'create client id'. 2) need not have configure every users. every time access application login own google account. 3) no can't avoid client id & client secret. needed functionality work. read more on https://developers.google.com/console/h...

java - Parsing a CSV file with custom String separator -

i tried parse csv file 2 apis - jsefa , opencsv - problem separator in csv file double tab "\t\t" , apis accept character, not string, separator. is there other api solve problem, or there s way determine new string separator in jsefa or opencsv? as last resort could, before parsing, try replace double tab semicolon hoping cleaner way. there's 101 examples online. googled "java parse csv" , #1 result: http://www.mkyong.com/java/how-to-read-and-parse-csv-file-in-java/ that uses string separator, code rather api. given parsing csv file pretty simple process, don't think it's example of situation requiring library , - unique requirement have strange \t\t separator - better code anyway.

vim - Replacing a motion in operator mode -

i'm trying alter ge motion's functionality when it's used operator. instead of operating on last character of target word, i'd work exclusively until target word's last character w . example: foo bar ^ should lead fooar instead of foar when use dge cursor @ ^ i don't know vimscript , i'm pretty relying on exe now. quick attempt wrote seems full of errors. variables don't seem working right @ all. my leading idea escape when ge typed in operator mode , call function right arguments. set mark on starting position, move left 1 column (to ensure work repeated movements, though operator mode only), move set amount of ge s , move 1 column right (my main goal here) , delete till set mark. if point out errors i've made, appreciated! function! fixge(count, operator) exe 'normal m[' exe 'normal h' exe count.'normal ge' exe 'normal l' exe operator.'normal `[' endfunction ...

How to hide `org.eclipse.ui.editors` on the basis of perspective -

suppose have 2 perspective. in application has 2 different org.eclipse.ui.editors following. perpsective1 editor1 perspective2 editor2 when switch perspective1 perspective2 application should hide editor1 opened instances should invisible , editor2 type should visible , vice versa. how can achieve this? open editors not affected perspective changes have code yourself. you can use iperspectivelistener (or extended iperspectivelistener4 ) notified perspective changes. the perspective listener added using iworkbenchwindow.addperspectivelistener

c# - Row index from hierarchical gridview -

i have gridview structure - <asp:gridview id="gvtest" runat="server" autogeneratecolumns="false" width="100%"> <columns> <asp:templatefield headertext="rule name" itemstyle-verticalalign="top"> <itemtemplate> <asp:label id="lblrulename" runat="server" text='<%# bind("rulename") %>'></asp:label> </itemtemplate> </asp:templatefield> <asp:templatefield headertext="source" itemstyle-verticalalign="top"> <itemtemplate> <asp:gridview id="gvsource" runat="server" showheader="false" autogeneratecolumns="false"> <columns> <asp:templatefield> ...

ruby on rails - Extend ActiveRecord -

my first foray modules! lib/model_extension/say_hello module firstmodule end class activerecord::base include firstmodule end the code in example raises error: lib/model_extension/say_hello.rb:5:in `<top (required)>': uninitialized constant activerecord (nameerror) so mean? need include activerecord::base before telling include modules? putting module in wrong place? and how should include module in model? include firstmodule would trick, properway it? when install gem alters models, include this: has_secure_password how should set can include module that?

c++ - Find a number inside a QString -

i have qstring number inside it, example first_34.33string second-23.4string // in case number negative how can extract number string? edit: this function seems work, using regexp in replies: float getnumberfromqstring(const qstring &xstring) { qregexp xregexp("(-?\\d+(?:[\\.,]\\d+(?:e\\d+)?)?)"); xregexp.indexin(xstring); qstringlist xlist = xregexp.capturedtexts(); if (true == xlist.empty()) { return 0.0; } return xlist.begin()->tofloat(); } this should work valid numbers: qregexp("(-?\\d+(?:[\\.,]\\d+(?:e\\d+)?)?)") edit: sorry, messed brackets, should work.

javascript - How to make clickable URL's in JSON response from REST using AngularJS? -

Image
i have angularjs , js , jq , html5 web app, can send different http methods project's restful web service , receive responses it. response comes in json , looks this: this displayed in <pre> element way: <div ng-controller="responsecontroller"> <span class="status-{{response.status}}">{{response.code}} {{response.description}}</span> <pre>{{response.data}}</pre> <p id="responseheaders">response headers:</p> <table> <tr ng-repeat="header in response.headers"> <td><a href="#" ng-click="addtoheaders(header)">{{header.name}}</a></td> <td><span>{{header.value}}</span></td> </tr> </table> </div> what want have url's received in json clickable, hang ng-click on them , go on next steps. can't in <pre> element. any ...

javascript - TypeScript class function not available -

i'm trying call instance method of typescript class (in asp.net mvc project). however, @ runtime exceptions 0x800a01b6 - javascript runtime error: object doesn't support property or method 'checkstring' . i copied generated javascript in jsfiddle method seems work. i'm not javascript guy, appreciated! things have tried far: different browsers (chrome: uncaught typeerror: undefined not function , ff: typeerror: this.checkstring not function ) clearing browser caches deleting temporary files of iis express cleaning , rebuilding solution not using private modifier starting project on machine replacing underscore.js call dummy verfiy that's not problem checked instance members correctly set this typescript code: class formdata { blogname: string; cachetimeout: number; copyrightholder: string; navbartitle: string; markdownextra: boolean; markdownsanitize: boolean; ratingactive: boolean; htmleditor: boolean; ...

Replace checkbox with a star image to emphasise it in Android app -

i have list view page in android application each row contains/displays text, date , checkbox. if checkbox selected, means particular row in list important. want replace checkbox star image indicate row important. list page code follows: <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/background_activated"> <checkbox android:id="@+id/note_list_item_solvedcheckbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:layout_alignparentright="true" android:enabled="false" android:focusable="false" android:padding="4dp" /> <textview android:id="@+id/no...

html - Force margin to use all width -

Image
js fiddle example i need these boxes in example placed same size out of each other on same line. how possible make? also, if resize window , 1 box drops down, in center in start of example. <div id='wrapper'> <ul> <li> </li> <li> </li> </ul> </div> edit: first, suggest using div s instead of <ul> , <li> otherwise have reset styles on them (for example, chrome adds -webkit-margin-before/after , other css properties can mess layout). fiddle divs . if need keep html markup, here fiddle taht works in chrome. html : <div id='wrapper'> <ul> <li><span></span> </li> <li><span></span> </li> <li><span></span> </li> </ul> </div> css : html, body { width:100%; margin:0; overflow: ...

C++/QT: "run" a QAction -

i need automate gui test using qt,c++,qtest (in eclipse) have dynamically created menu dynamically created qactions, need test "new tab" qaction (inside menu), how created: m_pnewtabaction = new qaction(qicon(":/images/add.png"), tr("&new tab"), this); m_pnewtabaction->setshortcut(tr("ctrl+n")); m_pnewtabaction->setstatustip(tr("open new tab")); connect(m_pnewtabaction, signal(triggered()), this, slot(newtab())); in testclass, managed access private qaction object (m_pnewtabaction) using "findchildren" function, dont know how can "execute" qaction (or in other words "add new tab") testclass: //get actions available filemenu qlist<qaction *> fileactions = filemenu->findchildren<qaction *>(); //execute action?? fileactions.front()-> //how execute qaction? i believe you're looking qaction::activate() : void qaction::activate(actionev...

vb.net - Linq add condition to all fields -

linq , vb.net i put search condition fields in table. example: dim query = c in dbcontext.mytable c.field1 = "searchstring" or c.field2 = "searchstring" or _ c.field3 = "searchstring" or … select c assume have more 100 fields , more tables. write this: dim query = c in in dbcontext.mytable search(c) select c private sub search(c …??) dim cond string each field in c cond += field.name = "searchstring" next return cond end sub if dynamic linq post me solution (vb.net) , example , … in https://www.nuget.org/packages/system.linq.dynamic/ system.linq.dynamic there no example , no suggestion solution best. have microsoft solution this? best approach? thanks. best regards. added this code works string , text type. how add solution int , datetime type?? integer must exact number field = 123 , not show when field 1234 or 112345. imports system.linq.dynamic dim dbcontext new...

php - MySQL Connection to Database -

i have following problem: i cannot open database connection. can tell me how database-config has if have mysql command? $dh = new db('table'); $dh->query("select * cars carname '%{$term}%'"); i've tried this: $dh = new db("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass); but not work. so how , have put in host, dbpass , dbuser then? here complete code: if(empty($_request['term'])) exit; $term = $_request['term']; $dh = new db('table'); $dh->query("select * cars carname '%{$term}%'"); $result = array(); $result['results'] = array(); $result['count'] = 0; while($carname = $dh->fetcharray()){ $result['count']++; $result['results'][] = $carname; } header('content-type: application/json'); echo json_encode($result); i want result json. but console says: get http://192.168.50.200:8888/xx/xx/source.php?ter...

javascript - variable should not grow -

i'm struggling quite long time strange problem in javascript. do: collecting elements html code change order randomly , 'put them back' i compute each position of divs getting height , adding offset. variable 'toppos' going crazy. everytime function gets evaluated not reset. instead grows , grows. site becomes quite glitchy in nice way. time want work in right way.. ( : can help? thanks. here code: function setpos(){ var vidarray = shuffleframes(); var toppos = 30; var prevheight = 0; for(var = 0; < vidarray.length; i++){ var element = vidarray[i]; element.style.top = toppos.tostring() + "px"; prevheight = $(vidarray[i]).height(); toppos = toppos + prevheight + 15; element.style.display = "block"; }; toppos = 30; }; it gets called function: function randstart(){ var elem = document.getelementsbyclassname("videofont"); getelements(elem); setpos(); }; here html-part: ...

c# - Keep Microsoft Word from adding files opened programmatically to its History -

i have .net program opens file programmatically in word modify it. unfortunately, microsoft word keeps times file opened in word in history, though don't want happen when file opened programmatically. how can keep happening in .net? if using documents.open or saveas can set addtorecentfiles property this: open: globals.thisaddin.application.documents.open("filename", addtorecentfiles: false); save as: globals.thisaddin.application.activedocument.saveas2("filename", addtorecentfiles: false);

python - Shapely difference of completely overlapping shapes -

Image
with python shapely can build polygons (here circle , rectangle) , built difference , sum of them described in shapely manual ( http://toblerity.org/shapely/manual.html ). "assertion error" when move rectangle position indicated in red. edit / answer sorry! found answer right after posting question: difference operation of course create 2 shapes. 1 can loop on them this: result = box.difference(circle) shape in result: ax.add_patch(polygonpatch(shape)) the answer in edit @ bottom of question-post.

javascript - iframe calls by user or server -

i quite new web programming , trying head around iframes. so, let have iframe on webpage (which on server) popular bbc site follows: <iframe src="http://www.bbc.co.uk"></iframe> now, when user goes page, iframe loads - but, making calls within iframe? (i.e bbc content?) server or user? i guess way ask question who's ip bbc's log see in case? web servers or users ip? stupid question suppose, confused! the user's web browser still making request. you can use browser's developer tools see happen , confirm (they pop pressing f12). please become comfortable them 1 of trusty tools web development in future. :) so answer question. regardless of page holding iframe lives, user still making request therefore ip should show up.

android - Bind item object in ItemTemplate in MVVMCross -

i developing mvvmcross multi platform app , i'm having following trouble converters: i have listview in android following code: <myprojectname.droid.mvxcustomviews.mvxlistview.mvxdroidlistview android:id="@+id/historiclist" android:layout_width="match_parent" android:layout_height="match_parent" android:cachecolorhint="#00000000" android:listselector="#00000000" android:fadingedge="none" local:mvxbind="itemssource historics;" local:mvxitemtemplate="@layout/historiclistitem" /> where, historics list. then, have in layout resource: <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#ffffff" android:orientation="horizontal"> <imageview android:id="@+id/historicicon" android:layout_...

VHDL Quadrature Decoder: Sequential/Combinatorial Logic -

i'm implementing quadrature decoder in vhdl , came 2 solutions. in method 1, of logic placed within 1 process sensitive clock , reset. on spartan-3a, uses 4 slices, 7 ffs , 4 input luts. code 1 architecture behavioral of quadr_decoder signal chan_a_curr : std_logic; signal chan_a_prev : std_logic; signal chan_b_curr : std_logic; signal chan_b_prev : std_logic; begin process (n_reset, clk_in) begin if (n_reset = '0') -- initialize internal signals chan_a_curr <= '0'; chan_a_prev <= '0'; chan_b_curr <= '0'; chan_b_prev <= '0'; -- initialize outputs count_evt <= '0'; count_dir <= '0'; error_evt <= '0'; elsif (clk_in'event , clk_in = '1') -- keep delayed inputs chan_a_prev <= chan_a_curr; chan_b_prev ...

ruby on rails - Capybara: Unable to find css again -

page source (from save_and_open_page): <a class="btn btn-mini btn-danger" data-confirm="are sure?" data-method="delete" href="/slides/1" rel="nofollow">delete</a> spec/features/slides_spec.rb: scenario "delete slide" visit album_slides_url slide.album # save_and_open_page expect{page.find('btn btn-mini btn-danger').click}.to change(slide, :count).by(-1) end error: unable find css "btn btn-mini btn-danger" there few q&a similar issue didn't find solution there. ideas ? in css selectors classes identified starting dots, easy forget. also, if want find element has of classes specified can't have whitespace in between them; otherwise looking children. page.find('.btn.btn-mini.btn-danger')

vb.net - windows forms load report failed -

i developing windows form application using visual studio 2010 , framework 4.0. have number of reports application use. my solution divided folders can keep files organized. have process in 1 folder trying load crystal report located in folder. when try load report file, error "load report failed". google search says either cannot find file or folder not have permission access it. since winforms application, not think permissions have error since application , folders included in overall assembly. have tried - in debug mode - use difference file naming include folder using every combination can think of no avail. i cannot see why error occurs. clues? dim rpt new reportdocument rpt .load("form1500_0212.rpt") .setparametervalue(0, bid) .setparametervalue(1, providerid) .verifydatabase() end dim frm new frmviewreport() frm.showdialog() there lot of ...

php - Codeigniter html tags from database -

i have tables in database wich store html tags <b>test</b> description <u>some text</u> i can see tags saved in database. when try retrive data like: $this->db->select('*'); $this->db->from('collecties'); $this->db->where('id' , $id); $query = $this->db->get(); i right data without tags. how can tags database. edit have read : html tags missing when select mysql (codeigniter) but im 100% sure tags in database because view mysql workbench.

c# - No definition and no extension method of assembly method missing? -

Image
it's common error , i'm able solve it. i have class: hierarchydata.cs using system; using system.collections.generic; using system.linq; using system.web; using system.configuration; using system.data; using system.data.sqlclient; namespace ct_wmt.app_code { public class hierarchydata { string sqlconnectionstring = configurationmanager.connectionstrings["snaggingmasterconnection"].connectionstring; public datatable gethierarchydata() { using (sqlconnection connection = new sqlconnection(sqlconnectionstring)) { sqlcommand command = new sqlcommand("sp_gethierachy", connection); command.commandtype = commandtype.storedprocedure; datatable dt = new datatable(); try { command.connection.open(); dt.load(command.executereader()); } catch (exceptio...

arrays - Matching exact fields -

i have question. i working large list data , need omit in field quantity of '0'. problem is, , see why, omitting other things contain '0' , i.e. 100, 101 , pretty contains 0 exact value of 0 . example table: id name food quantity price 1 josh hotdog 1 5.00 2 josh hotdog 100 5.0 3 josh hotdog 101 5.00 4 josh hotdog 0 5.00 5 josh hotdog 1 5.00 the row omit has 'id' number '4' . not need rows quantity of 0 . code have used command prompt one-liner apply batch files. looks this. perl i.bak -af\t -ne "print if $f[3] =~ "/[0]/" file.txt. now know not work because character class randomizes '0' . in other words saying "if" there '0' anywhere in field print it(or "unless", have "if" on 1 liner time see results). just looking exact match of '0' , wondering if possible method using. change perl i.bak -af\t -ne ...

jquery - Post data into database via ajax. displays 501 internal error -

Image
i trying post data asp.net webform database. have in asp.net service (shoppingcart_service.asmx) [webmethod] // public void registersubscriber(string email) { new onlineshoptableadapters.newslettersubscriberstableadapter().insert(email, datetime.now); //database code } this html <input type="button" onclick="savedata()" id="btnsave" value="subscribe" > this ajax code, put in file called apps.js , linked page //updated ! function savedata() { function savedata() { var subscriberemail = $("#email").val(); $.ajax({ type: "post", url: "shoppingcart_service.asmx/registersubscriber", data: '{"email":"' + subscriberemail + '"}', contenttype: "application/json; charset=utf-8", datatype: "json", success: function (response) { ale...

ios - Archiving in xcode takes very long time -

while archiving ios project in xcode 5.0.2 'debug' configuration selected takes hardly couple of minutes, while same 'release' configuration selected takes more 30 minutes. process gets stuck @ analysing(shallow) of time. same not true other projects. have have issue? thank you. update: while archiving gets struck once in middle of analyzing , again @ end of analyzing(shallow). are sure running product->archive , not product->analyse ? analyzing step mention give away. possibility somehow changed archive step analyze. update : based on comment: turn off analyze in archive step .

javascript - Scroll left / right an image with animation -

please take @ demo . by using code this post i've managed make image move horizontally clicking left or right links. what i'd achieve make image jumps smoother somehow. here's code: <script> var scrolldiv = function(dir, px) { var scroller = document.getelementbyid('scroller'); if (dir == 'l'){ scroller.scrollleft -= px; } else if (dir == 'r'){ scroller.scrollleft += px; } } </script> <a class="tarrowl" href="javascript: void(0);" onclick="scrolldiv('l', 80); return false;">« left</a> <a class="tarrowr" href="javascript: void(0);" onclick="scrolldiv('r', 80); return false;">right »</a> <div class="wrapout"> <div id="scroller" class="wrapin"> <img id="" src="http://lorempixel.com/outpu...

python - Apache Benchmark horror results with a simple Gevent app -

i have simple python code run gevent. tested apache benchmark 10000 users , 5 concurrent it's damn slow..nearly 2 seconds per request (1.419 ms) bad.. my code is from gevent import wsgi, monkey class webserver(object): def application(self, environ, start_response): start_response("200 ok", []) return ["hello world!"] if __name__ == "__main__": monkey.patch_all() app = webserver() wsgi.wsgiserver(('', 8888), app.application, log=none).serve_forever() and results pretty horrible server software: server hostname: 127.0.0.1 server port: 8888 document path: / document length: 12 bytes concurrency level: 5 time taken tests: 28.379 seconds complete requests: 100000 failed requests: 0 write errors: 0 total transferred: 10700000 bytes html transferred: 1200000 bytes requests per second: 3523.73 [#/sec] (mean) time per...

To which type does SWIG maps C++ signed char * type in Python? -

i need pass non null terminating buffer python c++. i'm using parameter of signed char* type instead of char* since latter converted null terminating string. python interface generated using swig (2.0.1). no typemaps applied swig should use default mapping. when i'm trying use method following error: notimplementederror: wrong number or type of arguments overloaded function as buffer tried passing both string , bytearray objects. in both cases mentioned error. so if have function in c++ type of object should pass in python ? void set_value(signed char *buffer, int size) you might able inline wrapper accepts c++ string (which not null terminated), this: %include <std_string.i> %inline %{ void set_value_str(const std::string& str) { set_value(str.c_str(), str.size()); } %} the std_string.i defines typemaps allow call set_value_str python string argument. don't know if typemap uses char array version of std::string constructor,...