Posts

c - ERROR: variable "string" is not initialized -

i wrote code reads .txt string , settles in char *, gives me error variable "string" not initialized, if initialized inside fscanf, can u tell me wrong? thanks! char *string; file *fp = fopen("words.txt", "r"); fscanf(fp, "%s", string); that's normal, didn't allocate string. c needs allocate in memory before use it. have know size. in code, string points memory doesn't exist (to exact points somewhere have lot of chance can't access it) see how malloc works.

ios - receiving response from json webservice using unknown key -

this question has answer here: nsdictionary order not match allkeys order 2 answers i receiving response json web service , able parse it. when parsing json data using [mydic allkeys] (as unknown keys parse using allkeys method) gives me response changes order of receiving keys. so want order should not changed. if knows solution please help. thanks. this known behavior. documentation states: allkeys property a new array containing dictionary’s keys, or empty array if dictionary has no entries the order of elements in array not defined.

android - How to disable key preview in popup keyboard (not in main softkeyboard layout)? -

it's easy disable key previews: call setpreviewenabled(false) , these annoying tiny previews won't show anymore. if attach popup keyboard key these previews show inside popup: qwerty.xml: <key android:codes="101" android:keylabel="e" android:popupkeyboard="@xml/popup" android:keytextsize="60sp"/> popup.xml: <row> <key android:codes="-10000" android:keylabel="test" android:keyoutputtext="test"/> </row> <row> <key android:codes="-10001" android:keylabel="test2" android:keyoutputtext="test2"/> </row> can't post images, if long press letter 'e' , press test or test2 button show white key preview. is there way disable these key previews too? create customkeyboard setpreviewenabled(false) add rows inside customekeyboard in popup.xml below <customkeyb...

javascript - TinyMCE editor in WordPress is not loading correctly -

Image
i've encountered problem yesterday when uploaded files testing website. website running on wordpress version 4.2.2. , i'm using own theme i've been developing 1 client. now problem tinymce editor in wordpress started acting weird. here picture of local deployment of site: on local works fine. no problems or anything. here picture of online deployment: as can see there problem it. text , visual buttons not rendered correctly , they've switched places. when click on visual nothing in editing area , on text there 1 small part of post's content. now i've tried know solve problem. here list of have tried far: uploaded theme , tried switching theme check if problem in theme. no luck. problem remains. i've tried disabling parts in theme check if solve problem. still no luck. today i've deleted live database , whole wordpress folder on web server , uploaded again. problem still remains. i have no clue caused problem @ all. have 1 pl...

associations - Where should I add data for an associated model in cakephp-3 -

i create few default entities users when register account, example being profile, there no data user registration form, user entities should have profile still seems fitting create it. before 'but there no data, cope in controller/views' - yes know, not use cases allow it, , require empty/default data. is should added data register form in controller, before doing save? me seems more logical there should in model says valid user has profile, , if there no data there create (perhaps using username profile full name). is achievable in beforesave callback or controller? is there minimum need have in patchentity related entity save (my current attempts have profile in debug, none of data thought setting, nothing saves) many thanks i hope got questions right. yes why shouldn't possible? create associated( http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-with-associations ) entry , make fields nullable. to save related should follow conventio...

oracle10g - org.hibernate.HibernateException: Dialect class not found when using custom Dialect -

hello i'm trying find solution oracle conversions problem (doesn't accept "number" double) jboss 7.1 , hibernate. so, best suggested solution make custom dialect way : public class myoracle10gdialect extends oracle10gdialect { public myoracle10gdialect() { super(); } protected void registernumerictypemappings() { super.registernumerictypemappings(); registercolumntype( types.double, "number" ); }} in hibernate.cfg.xml added : <property name="hibernate.dialect">com.d2i.sssim.hibercommun.myoracle10gdialect</property> but got : org.hibernate.hibernateexception: dialect class not found: com.d2i.sssim.hibercommun.myoracle10gdialect it's same project, hibernate connection. should create project 1 class (myoracle10gdialect) , include in project lib? why hibernate.cfg.xml can't see classes in it's own project? help? you may using hibernate jboss module , such cannot see custom class in applic...

javascript - jQuery resizable synch resize -

Image
i ask if how can fix resizable jquery. want if resize parent element resize children inside of parent element. here's current code: <div id="img_holder" style="width:100px;height:120px;float:left;margin:5px;"> <a href="#" target="_blank" class="thumbnail" style="text-decoration:none;height:120px;"> <img src="suits.jpg" style="height:110px !important;" /> </a> </div> $("#img_holder").resizable({alsoresize: "#img_holder a, #img_holder img"}); here's output when resizing thank you! the anchor , images in example have preset height , not going resize height larger set height. notice img height set using !important .