Posts

php - HTTP Error 500 (Internal Server Error) in Drupal -

iam providing datas using json ios app using php. while running code in browser, showing server error. if there no values in database, shows {"posts":null} provided in code. problem occurs if there value in database. shows error server error website encountered error while retrieving http://path server file/php/categoryitemlisting.php?category=11. may down maintenance or configured incorrectly. here suggestions: reload webpage later. http error 500 (internal server error): unexpected condition encountered while server attempting fulfill request. error occuring php file. using other files, able transfer data. my connection.php file : <?php $link = mysql_connect("127.0.0.1","root","") or die('cannot connect db'); mysql_set_charset("utf8"); mysql_select_db('cotton',$link) or die('cannot select db'); ?> categoryitemlisting.php <?php require('connection.php'); $item = array() ...

apk - How to Access sysfs entry from android application -

can please explain me on how access value exposed sysfs android application. a reference suggests can not access here but there 1 android application same. please explain. i found answer after research this how works. //cmd path of script executed string cmd = "/home_dir/./my_shell_script.sh" ; runtime run = runtime.getruntime() ; //this run script java process pr = run.exec(cmd) ; the values returned can read this bufferedreader buf = new bufferedreader(new inputstreamreader(pr.getinputstream())); try { string string = buf.readline(); char[] text = string.tochararray(); int start = 0; int len = string.length(); textview.settext(text, start, len); toast.maketext(this, string, toast.length_short).show(); } catch (ioexception e) { toast.maketext(this, e.getmessage(), toast.length_short).show(); } it show variable/output in toast message. references: 1 executing shell c...

ios - Warning: Signed shift result (0x1F0000000) requires 34 bits to represent, but 'int' only has 32 bits -

after compiling remail project no error, 1 of warnings is: remail-iphone/sqlite3/sqlite3.c:18703:15: signed shift result (0x1f0000000) requires 34 bits represent, 'int' has 32 bits i.e. (0x1f<<28) in following code: if (!(a&0x80)) { &= (0x1f<<28)|(0x7f<<14)|(0x7f); b &= (0x7f<<14)|(0x7f); b = b<<7; |= b; s = s>>11; *v = ((u64)s)<<32 | a; return 7; } what's proper way kill warning ios (32-bit)? remail iphone seems using old version of sqlite (3.6.15). if i'm not mistaken, following commit should fix problem: http://www.sqlite.org/src/info/587109c81a9cf479?sbs=0 if (!(a&0x80)) { /* assert( ((0xff<<28)|(0x7f<<14)|(0x7f))==0xf01fc07f ); */ &= 0xf01fc07f; b &= (0x7f<<14)|(0x7f); b = b<<7; |= b; s = s>>11; *v = ((u64)s)<<32 | a; return 7; } however, there might other code sect...

javascript - Highlight an item in jQuery UI Multiselect Next -

i have jquery ui multiselect next http://quasipartikel.at/multiselect_next want highlight item using colour. for example, have: <select id="countries" class="multiselect" multiple="multiple" name="countries[]"> <option value="afghanistan" selected="selected">afganistan</option> <option value="albania" selected="selected">albania</option> <option value="austria" selected="selected">austria</option> <option value="germany" selected="selected">germany</option> </select> is possible highlight germany in red? i using highlight 4th row: .ui-multiselect ul.selected > li:nth-child(3) { background:none; background-color:green; } if want multiple replace li li:nth-child(2n+1) odd etc… hope helps.

javascript - jQuery - this.option becomes undefined in load function -

i'm trying alter plugin little bit, here's prototype function, i've marked lines i've added. ok, problem happens inside img-load function i've added. i've surrounded old code 1 assure script waits until image has loaded. problem is, "this" inside load-function not connected 1 outside. i've tried giving load function parameter apparently it's not working or i'm doing wrong. do know easy way sort-of inherit "this"? don't know else do. plugin.prototype._fade = function(number) { var $element, currentslide, next, slidescontrol, value, _this = this; $element = $(this.element); this.data = $.data(this); if (!this.data.animating && number !== this.data.current + 1) { $.data(this, "animating", true); currentslide = this.data.current; if (number) { number = number - 1; value = number > currentslide ? 1 : -1; next = number; } else { value = this.data.dire...

c# - Cannot re-assign a value to XSLT variable, or can I exit from for-each loop conditionally -

cannot re-assign value xslt variable, or can exit from <xsl:for-each conditionally xml <r> <a id="a"> <s id="a111">1</s> <s id="a222">2</s> <s id="a333">3 <s id="a3331">3.1</s> <s id="a3332">3.2</s> <s id="a3333">3.3</s> </s> <s id="a444">4</s> <s id="a555">5</s> <s id="a666">6</s> </a> <a id="x"> <s id="x111">1</s> <s id="x222">2</s> <s id="x333">3 <s id="x3331">3.1</s> <s id="x3332">3.2</s> <s id="x3333">3.3</s> </s> <s id="x444">4</s> <s id="x555">5</s> <...

objective c - Generate unique name everytime like "Windows folder structure" behaviour -

i want create folder structure logic windows.i using sqlite database that. want generate unique name everytime. e.g. if user enters text name "new". , if again enter same name "new" should new(1). if again enter same name "new" should "new(2)". if user delete "new(1)" entry , enter "new" "new(1)" should placed in between "new" , "new(2)". could suggest logic that? appreciated? in advance tejas i consider have database id , foldername fields. need retrieve records database. in of query use like operator. once list go in loop , add add new entry comparing number. try this.