Search Results

Search found 3 results on 1 pages for 'cyn'.

Page 1/1 | 1 

  • How to store array data in MySQL database using PHP & MySQL?

    - by Cyn
    I'm new to php and mysql and I'm trying to learn how to store the following array data from three different arrays friend[], hair_type[], hair_color[] using MySQL and PHP an example would be nice. Thanks Here is the HTML code. <input type="text" name="friend[]" id="friend[]" /> <select id="hair_type[]" name="hair_type[]"> <option value="Hair Type" selected="selected">Hair Type</option> <option value="Straight">Straight</option> <option value="Curly">Curly</option> <option value="Wavey">Wavey</option> <option value="Bald">Bald</option> </select> <select id="hair_color[]" name="hair_color[]"> <option value="Hair Color" selected="selected">Hair Color</option> <option value="Brown">Brown</option> <option value="Black">Black</option> <option value="Red">Red</option> <option value="Blonde">Blonde</option> </select> <input type="text" name="friend[]" id="friend[]" /> <select id="hair_type[]" name="hair_type[]"> <option value="Hair Type" selected="selected">Hair Type</option> <option value="Straight">Straight</option> <option value="Curly">Curly</option> <option value="Wavey">Wavey</option> <option value="Bald">Bald</option> </select> <select id="hair_color[]" name="hair_color[]"> <option value="Hair Color" selected="selected">Hair Color</option> <option value="Brown">Brown</option> <option value="Black">Black</option> <option value="Red">Red</option> <option value="Blonde">Blonde</option> </select> Here is the MySQL tables below. CREATE TABLE friends_hair ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, hair_id INT UNSIGNED NOT NULL, user_id INT UNSIGNED NOT NULL, PRIMARY KEY (id) ); CREATE TABLE hair_types ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, friend TEXT NOT NULL, hair_type TEXT NOT NULL, hair_color TEXT NOT NULL, PRIMARY KEY (id) );

    Read the article

  • Android MediaPlayer Won't Play Different Sounds

    - by cYn
    I'm making a simple app that plays a different sound according to its orientation. So if it's placed face down, a sound is played. If placed on its left side, a different sound is played. I'm having a hard time manipulating MediaPlayer correctly. My app runs fine. But it will only play one sound. For example. When I first boot up my app and place my device facing up, a sound will play. If I change its orientation, the sound will pause. But it will not start a different sound in a different orientation. BUT, if I place the device back facing up, it resumes the sound that it paused. I know I'm doing something wrong here, but I can't seem to figure it out the correct structure in using MediaPlayer and the program constantly calling it through onSensorChanged. public class MainActivity extends Activity implements SensorEventListener{ MediaPlayer mpAudioAttention; MediaPlayer mpAudioAssembly; MediaPlayer mpAudioRecall; MediaPlayer mpAudioRetreat; MediaPlayer mpAudioReveille; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); sm = (SensorManager) getSystemService(SENSOR_SERVICE); setContentView(R.layout.main); mpAudioAttention = MediaPlayer.create(this, R.raw.attention); mpAudioAssembly = MediaPlayer.create(this, R.raw.assembly); mpAudioRecall = MediaPlayer.create(this, R.raw.recall); mpAudioRetreat = MediaPlayer.create(this, R.raw.retreat); mpAudioReveille = MediaPlayer.create(this, R.raw.reveille); } public void onSensorChanged(SensorEvent event) { synchronized (this) { Log.d(tag, "onSensorChanged: " + event + ", z: " + event.values[0] + ", x: " + event.values[1] + ", y: " + event.values[2]); zViewO.setText("Orientation Z: " + event.values[0]); xViewO.setText("Orientation X: " + event.values[1]); yViewO.setText("Orientation Y: " + event.values[2]); } //face down if (event.values[2] > -11 && event.values[2] < -9){ mpAudioRetreat.start(); } else mpAudioRetreat.pause(); //face up if (event.values[2] < 11 && event.values[2] > 9){ mpAudioReveille.start(); } else mpAudioReveille.pause(); //standing if (event.values[0] > -10 && event.values[0] < -8){ mpAudioAttention.start(); } else mpAudioAttention.pause(); //left sideways if (event.values[1] < 11 && event.values[1] > 9){ mpAudioAssembly.start(); } else mpAudioAssembly.pause(); //right sideways if (event.values[1] > -11 && event.values[1] < -9){ mpAudioRecall.start(); } else mpAudioRecall.pause(); }

    Read the article

  • Plone Active Directory group filter

    - by Jason Weber
    I am currently trying to configure the Plone LDAP plugin for Active directory. Thus far all is good and I’m getting users and groups through. The usage is for Cyn.In However the problem I’m facing is thus: The users search has the ability to filter, which is great. I can use the memberOf or department filter to just grab the users I want. However all our groups simply live in one OU, which means I’m getting over 30 pages of groups of which 99% are just not necessary. Sadly I don’t have control over our AD, so can’t just shift the ones I want into their own OU. Is there any way you can think of to also filter groups based on some kind of LDAP criteria?

    Read the article

1