[Solved] How to nest php inside if statement

I like this syntax myself ( when working in mixed HTML/PHP ) <?php $blogname = get_bloginfo(‘name’); if ($blogname == ‘Wobbling Willy’): //-note- colon not semi-colon ?> <meta name=”description” content=”<?= bloginfo(‘description’); ?>” /> <meta name=”keywords” content=”keyword1, keyword2, keyword3” /> <?php endif; ?> OR <?php $blogname = get_bloginfo(‘name’); if ($blogname == ‘Wobbling Willy’){ //open bracket ?> <meta … Read more

[Solved] Scanf clarification in c language

Do not use scanf() or gets() function — use fgets() instead. But for the above question please find the answer. int main() { char a[30]; scanf (“%29[^\n]%*c”, name); printf(“%s\n”, a); return 0; } Its also highly recommended like I told in the beginning to use fgets() instead. We clearly do not understand the weird requirement. … Read more

[Solved] Sql code to create the Mirror image of the string in Oracle sql [closed]

If “mirror” is reversed text use: SELECT REVERSE(‘my_text’) FROM dual; EDIT: SqlFiddleDemo SELECT t ,REVERSE(t) AS Mirror1 ,TRANSLATE(t, ‘abcdefghijklmnopqrstuvwxyz’,N’ɐqɔpǝɟbɥıظʞןɯuodbɹsʇnʌʍxʎz’) AS Mirror2 ,TRANSLATE(REVERSE(t), ‘abcdefghijklmnopqrstuvwxyz’,N’ɐqɔpǝɟbɥıظʞןɯuodbɹsʇnʌʍxʎz’) AS Mirror3 FROM tab; 2 solved Sql code to create the Mirror image of the string in Oracle sql [closed]

[Solved] How to perform this printing in for loop?

Use zip and slices >>> for i,j in zip(en[::2],en[1::2]): … print(“{}{}”.format(i,j)) … 12 34 56 As Steven Rumbalski mentions in a comment you can also do >>> it = iter(en) >>> for i,j in zip(it, it): … print i,j … 1 2 3 4 5 6 it here is an iterator over the list. Hence … Read more

[Solved] What is (button) in android? [duplicate]

(Button) is a typecast. Every widget that comes back from findViewById is a View. To treat it as a button, you must explicitly tell the compiler that it is a Button. More information on findViewById here, in the Android documentation: http://developer.android.com/reference/android/app/Activity.html 1 solved What is (button) in android? [duplicate]