[Solved] how to add checkbox intems in to data base in one row [closed]

If you want it all stored in one record, first remove the for() loop. Then you have a couple options take your pick: $emode = mysql_real_escape_string(json_encode($mode)); $emode = mysql_real_escape_string(serialize($mode)); $emode = mysql_real_escape_string(implode(‘,’,$mode)); Then you just have decode on the way out. 3 solved how to add checkbox intems in to data base in one row … Read more

[Solved] why location manager is null [closed]

There is no reason to explicitly set myLocationManager to null in the class public class GeoWebOne extends Activity { private static String PROVIDER=LocationManager.GPS_PROVIDER; private WebView browser; private LocationManager myLocationManager; Would have worked just as well; and is probably slightly easier to read. solved why location manager is null [closed]

[Solved] Two EditText fields with rounded cornors android [closed]

Just create a drawable resource that specifies the way the EditText will be drawn: <?xml version=”1.0″ encoding=”utf-8″?> <!– res/drawable/rounded_edittext.xml –> <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”rectangle” android:padding=”10dp”> <solid android:color=”#FFFFFF”/> <corners android:bottomRightRadius=”15dp” android:bottomLeftRadius=”15dp” android:topLeftRadius=”15dp” android:topRightRadius=”15dp”/> </shape> reference this drawable in your layout: <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” > <EditText android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:padding=”5dip” android:background=”@drawable/rounded_edittext” /> </LinearLayout> 2 … Read more

[Solved] Regex for this format [40]*100+ [closed]

This regexp tests for the format you describe: /^(\[\d{1,3}\]\*\d{1,3}\+)+$/ \d{1,3} matches up to 3 digits. We put one of these inside literal [], with literal * after that, and literal + after the second one. Then we use a quantified group to allow multiple repetitions. You can’t do the validation until the user has finished … Read more

[Solved] Problem with JavaScript and adding a div to a grid at a specific (row, column) position [closed]

This is a very interesting problem. The problem, as you so rightly indicate, is in the JavaScript file. The first problem I can see is the way you are setting div.style.gridColumnStart in the initTile function (also known as method). grid.style.gridColumnStart is not a function, but a setting (also known as property), so you should just … Read more

[Solved] Spaces not being replaced with newlines

Welcome to C! You have allocated no memory so you error. Use malloc to allocate the memory. I have made this code that works for you: void f(char*s,char*toString) { char c,i=0,j=0; int num=0; while(c=*(s++)) { toString[num]=c; // putchar(c); if(c==’ ‘)++i; if((j<4&&i==7)||(j>=4&&i==6)) { i=0; ++j; toString[num]=’\n’; // putchar(‘\n’); } num++; } } state_t initial_user_state_to_c(char * string) … Read more

[Solved] Can someone explain this C++ code? [closed]

If i equals 0, then you can’t look words[i-1] because you can’t do words[-1] Furthermore, when you use || operator, if the first expression is true, the second expression is not checked With i == 0 || words[i – 1] != words[i] you can print your first words because i equals 0 and the expression … Read more

[Solved] Simplified Java Library? [closed]

How about a static import? // No promises this is compilable Java import static Landscape.createGrass; public class Wtv { public static void main(String[] argv) { int coord_x = 4; int coord_y = 7; createGrass(coord_x, coord_y); } } 2 solved Simplified Java Library? [closed]

[Solved] C system calls, delete the file

Just call truncate or ftruncate to cut the file to zero bytes. Then write the line you want. You don’t need to close or re-open the file, you can use your existing handle. 2 solved C system calls, delete the file