Search Results

Search found 7391 results on 296 pages for 'record locking'.

Page 33/296 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • How to monitor screen updates?

    - by user299600
    I am trying to write a program that monitors when the screen has been redrawn. Meaning if any part of any window is redrawn, then the program is notified. As far as I understand I should use a journal record hook like at http://www.vbaccelerator.com/home/vb/code/libraries/Hooks/Journal_Record_Hooks/article.asp However, I do not understand which MSG type would get me the WM_PAINT events (WH_CALLWNDPROC and WH_CALLWNDPROCRET do not seem to do the job). I'm not even sure that WM_PAINT is what I'm looking for... Basically, if I knew when the DC associated with GetDesktopWindow() has changed then my problem would be solved. Question is: How do you monitor screen updates?

    Read the article

  • Unable to retrieve the complete description string of the event log record

    - by Santosh Pillai
    Hi All, I have an MFC application that reads and displays event log records using the ::ReadEventLog() API. The problem is with reading the "Description" message string of the event log record. The MFC application is unable to read the complete "Description" message string and displays only some part of it. However the Windows System Event Log Viewer reads and displays the complete "Description" message string correctly. I have ensured that my MFC application reads the entire "Description" message string by retrieving all the strings as provided by the "NumStrings" and "StringOffset" member variables of the EVENTLOGRECORD structure and merging all of them. Also as mentioned in MSDN my application loads the Source Name specific message library file (whose path is specified in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application[SourceName]) that further contains additional message string information and merges it with the earlier read strings. I am still unable to get the entire "Description" message string. Please provide any help towards resolving the issue. Regards, Santosh.

    Read the article

  • Ms Access Save record in subform

    - by LanguaFlash
    I have a main form with a tab control containing multiple subforms. I need to be sure that the data in a subform is saved when the user switches tabs. The problem is that DoCmd.RunCommand acCmdSaveRecord seems only applies to the current form so it doesn't save the data in the subform. I have tried different events on the subform such as deactivate, OnLostFocus etc but they don't fire until another field somewhere else gets the focus. The ideal solution would seem to be to put something on the OnChange event of the tab control to be sure that all the data is saved. That is my question, how to do I save the record in a subform?

    Read the article

  • Change Large Number of Record Keys using Map Table

    - by Coyote
    I have a set of records indexed by id numbers, I need to convert these record's indexes to a new id number. I have a two column table mapping the old numbers to the new numbers. For example given these two tables, what would the update statement look like? Given: OLD_TO_NEW oldid | newid ----------------- 1234 0987 7698 5645 ... ... and id | data ---------------- 1234 'yo' 7698 'hey' ... ... Need: id | data ---------------- 0987 'yo' 5645 'hey' ... ... This oracle so I have access to PL/SQL, I'm just trying to avoid it.

    Read the article

  • postgres counting one record twice if it meets certain criteria

    - by Dashiell0415
    I thought that the query below would naturally do what I explain, but apparently not... My table looks like this: id | name | g | partner | g2 1 | John | M | Sam | M 2 | Devon | M | Mike | M 3 | Kurt | M | Susan | F 4 | Stacy | F | Bob | M 5 | Rosa | F | Rita | F I'm trying to get the id where either the g or g2 value equals 'M'... But, a record where both the g and g2 values are 'M' should return two lines, not 1. So, in the above sample data, I'm trying to return: $q = pg_query("SELECT id FROM mytable WHERE ( g = 'M' OR g2 = 'M' )"); 1 1 2 2 3 4 But, it always returns: 1 2 3 4

    Read the article

  • Active Record/ORM vs Normal Forms?

    - by Arsenal
    Hello, I've been playing around with Active Record a bit, and I have noticed that A.C./ORM always uses the following database model when creating a one-to-one relationship Person id | country_id | name | ... Country id | tld | name | ... No I wondered, isn't this a violiation of the third Normal Form? This clearly states "Every non-prime attribute is non-transitively dependent on every key of the table". Well this country_id isn't dependent of personid is it? So is this wrong or am I just not getting the point?

    Read the article

  • MySQL: Storage of multiple text fields for a record

    - by Tom
    An inexperienced question: I need to store about 10 unknown-length text fields per record into a MySQL table. I expect no more than 50K rows in total for this table but speed is important. The database actions will be solely SELECTs for all practical purposes. I'm using InnoDB. In other words: id | text1 | text2 | text3 | .... | text10 As I understand that MySQL will store the text elsewhere and use its own indicators on the table itself, I'm wondering whether there's any fundamental performance implications that I should be worrying about given the way the data is stored? (i.e. several "sub-fetches" from the table). Thank you.

    Read the article

  • mysql to get depth of record, count parent and ancestor records

    - by Nate
    Hey All, Say I have a post table containing the fields post_id and parent_post_id. I want to return every record in the post table with a count of the "depth" of the post. By depth, I mean, how many parent and ancestor records exist. Take this data for example... post_id parent_post_id ------- -------------- 1 null 2 1 3 1 4 2 5 4 The data represents this hierarchy... 1 |_ 2 | |_ 4 | |_ 5 |_ 3 The result of the query should be... post_id depth ------- ----- 1 0 2 1 3 1 4 2 5 3 Thanks in advance!

    Read the article

  • php retrieving id of the last record inserted and insert it in another table

    - by Mauro74
    Hi all, I'm trying to retrieve the id of the last record inserted in the table 'authors' and insert the retrieved id in the 'articles' table; here's my code: $title = mysql_real_escape_string($_POST[title]); $body = mysql_real_escape_string($_POST[body]); $category = mysql_real_escape_string($_POST[category]); $insert_author="INSERT INTO authors (name) VALUES ('$title')"; $select_author= mysql_query("SELECT LAST_INSERT_ID()"); $authId = mysql_fetch_array($select_author); $query="INSERT INTO articles (body, date, category, auth_id) VALUES ('$body', '$date_now', '$category', '$authId')"; this doesn't work... Any idea please? Thanks in Advance Mauro

    Read the article

  • Active Record like functionality on array instance variable

    - by rube_noob
    I would like to write a module that provides active record like functionality on an array instance variable. Examples of its use would be x = Container.new x.include(ContainerModule) x.elements << Element.new x.elements.find id module ContainerModule def initialize(*args) @elements = [] class << @elements def <<(element) #do something with the Container... super(element) end def find(id) #find an element using the Container's id self #=> #<Array..> but I need #<Container..> end end super(*args) end end The problem is that I need the Container object within these methods. Any reference to self will return the Array, not the Container object. Is there any way to do this? Thanks!

    Read the article

  • Making of a "Babbelbox" where you can speak to for partys

    - by Spidfire
    Ive got a project to make for a party, its called in holland a "Babbelbox". its a computer with a webcam and microphone that can be used to make a kind of video log of everyone who wants to say something about the party. But the problem is that i dont know where to start. ive made a kind of video show system in c but i cant save any data to a good format so it wont jam my harddisk in one hour full. Requirements: Record video + audio Recoding has to start after pressing a button Good compression over the recorded videos (would be even better if it can to be read by final cut pro or premiere pro) Light wight programm would be nice but i could scale up the computer power

    Read the article

  • Record audio via MediaRecorder

    - by Isuru Madusanka
    I am trying to record audio by MediaRecorder, and I get an error, I tried to change everything and nothing works. Last two hours I try to find the error, I used Log class too and I found out that error occurred when it call recorder.start() method. What could be the problem? public class AudioRecorderActivity extends Activity { MediaRecorder recorder; File audioFile = null; private static final String TAG = "AudioRecorderActivity"; private View startButton; private View stopButton; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); startButton = findViewById(R.id.start); stopButton = findViewById(R.id.stop); setContentView(R.layout.main); } public void startRecording(View view) throws IOException{ startButton.setEnabled(false); stopButton.setEnabled(true); File sampleDir = Environment.getExternalStorageDirectory(); try{ audioFile = File.createTempFile("sound", ".3gp", sampleDir); }catch(IOException e){ Toast.makeText(getApplicationContext(), "SD Card Access Error", Toast.LENGTH_LONG).show(); Log.e(TAG, "Sdcard access error"); return; } recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setAudioEncodingBitRate(16); recorder.setAudioSamplingRate(44100); recorder.setOutputFile(audioFile.getAbsolutePath()); recorder.prepare(); recorder.start(); } public void stopRecording(View view){ startButton.setEnabled(true); stopButton.setEnabled(false); recorder.stop(); recorder.release(); addRecordingToMediaLibrary(); } protected void addRecordingToMediaLibrary(){ ContentValues values = new ContentValues(4); long current = System.currentTimeMillis(); values.put(MediaStore.Audio.Media.TITLE, "audio" + audioFile.getName()); values.put(MediaStore.Audio.Media.DATE_ADDED, (int)(current/1000)); values.put(MediaStore.Audio.Media.MIME_TYPE, "audio/3gpp"); values.put(MediaStore.Audio.Media.DATA, audioFile.getAbsolutePath()); ContentResolver contentResolver = getContentResolver(); Uri base = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; Uri newUri = contentResolver.insert(base, values); sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, newUri)); Toast.makeText(this, "Added File" + newUri, Toast.LENGTH_LONG).show(); } } And here is the xml layout. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/RelativeLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <Button android:id="@+id/start" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="146dp" android:onClick="startRecording" android:text="Start Recording" /> <Button android:id="@+id/stop" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/start" android:layout_below="@+id/start" android:layout_marginTop="41dp" android:enabled="false" android:onClick="stopRecording" android:text="Stop Recording" /> </RelativeLayout> And I added permission to AndroidManifest file. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="in.isuru.audiorecorder" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".AudioRecorderActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.RECORD_AUDIO" /> </manifest> I need to record high quality audio. Thanks!

    Read the article

  • CakePHP hasAndBelongsToMany (HABTM) Delete Joining Record

    - by Jason McCreary
    I have a HABTM relationship between Users and Locations. Both Models have the appropriate $hasAndBelongsToMany variable set. When I managing User Locations, I want to delete the association between the User and Location, but not the Location. Clearly this Location could belong to other users. I would expect the following code to delete just the join table record provided the HABTM associations, but it deleted both records. $this->Weather->deleteAll(array('Weather.id' => $this->data['weather_ids'], false); However, I am new to CakePHP, so I am sure I am missing something. I have tried setting cascade to false and changing the Model order with User, User-Weather, Weather-User. No luck. Thanks in advance for any help.

    Read the article

  • Catch Id (INT AUTO INCREMENT) of a Record after INSERT INTO Statement

    - by Johannes
    This is my first time I use MySQL as datastorage for my C# Application, as I've seen that there is no UNIQUEIDENTIFIER type as in SQL server I decieded to use INT with AUTO_INCREMENT, my problem is now if I execute a INSERT, how may I get the ID of the Record I just added. My quick and dirty solution has been to execute a SELECT MAX(ID) FROM table Statement. But this doesn't seem consistent. I belive there is a better solution something like mysql_insert_id() (PHP). Any Idea how to resolve this in C#?

    Read the article

  • Insert record into mysql db with Entity Framework

    - by sanfra1983
    Hi, the problem is that it will insert a new record in a mysql table, I have already done the mapping of the mysql db and I have already done tests returning data and everything works. Now I read from a file, where there are queries written, I have them run me back and the result of true or false based on the final outcome of single query written to the file. Txt; I did this: using (var w = new demotestEntities ()) ( foreach (var l listaqueri) ( var p = we.CreateQuery <category> (l); we.SaveChanges (); result = true; ) ) but it does not work, I sense that it returns no errors, but neither the result given written in the query. txt file is as follows: INSERT INTO category (id, name) VALUES (null, 'test2') anyone can help me?

    Read the article

  • SQL Server 2008 - Get Geography From Record

    - by user336786
    Hello, I am new to using the geography types in SQL Server 2008. I have a table in my database called "Location". "Location" has the following columns and types: Location -------- City nvarchar(256) State nvarchar(256) PostalCode nvarchar(25) Latitude decimal(9, 6) Longitude decimal(9, 6) Each Location is related to a Store record in my database. I am trying to find the stores within a 10 mile radius or postal code or city/state that a user enters. To accomplish this, I know that I need to rely on geographies. At this time I have: DECLARE @startingPoint geography; SET @startingPoint=geography::STGeomFromText('POINT(-122.34900 47.65100)', 4326); That gives me the starting point from a hard-coded textual value. However, I do not know how to convert a lat/long from my Location table into a geography instance. How do I convert a lat/long in my database to a geography instance so I can continue to work on my query? Thank you!

    Read the article

  • How to Find Frequency while recording voice in iphone?

    - by Pugal Devan
    Hi Friends, In my application i have done to record the voice and playing in the device. Now i want to find the audio frequency of that recorded voice(While recording). How can i find?.I dont have any idea. I have downloaded "aurio Touch" program.But its too difficult to understand me. So is there any tutorials are avilable(in iPhone)?. How can i achieve this? Please guide me. Thanks.

    Read the article

  • CodeIgniter Active Record Queries W/ Sub Queries

    - by Mike
    Question: I really am trying to stick to using ActiveRecord and not using straight SQL.. can someone help me convert this to activerecord? Trying to get the email address and contact name from another table. map_userfields table is a one to many, multiple rows per p.id. one row per p.id per uf.fieldid. see this screenshot for a reference to the map_userfields table: Current Non active record query SELECT p.id, (SELECT uf.fieldvalue FROM map_userfields uf WHERE uf.pointid = p.id AND uf.fieldid = 20) As ContactName, (SELECT uf.fieldvalue FROM map_userfields uf WHERE uf.pointid = p.id AND uf.fieldid = 31) As ContactEmail FROM map_points p WHERE /** $pointCategory is an array of categories to look for **/ p.type IN($pointCategory) Note: I am using CodeIgniter 2.1.x, MySQL 5.x, php 5.3

    Read the article

  • How to use SQL trigger to record the affected column's row number

    - by Freeman
    I want to have an 'updateinfo' table in order to record every update/insert/delete operations on another table. In oracle I've written this: CREATE TABLE updateinfo ( rnumber NUMBER(10), tablename VARCHAR2(100 BYTE), action VARCHAR2(100 BYTE), UPDATE_DATE date ) DROP TRIGGER TRI_TABLE; CREATE OR REPLACE TRIGGER TRI_TABLE AFTER DELETE OR INSERT OR UPDATE ON demo REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW BEGIN if inserting then insert into updateinfo(rnumber,tablename,action,update_date ) values(rownum,'demo', 'insert',sysdate); elsif updating then insert into updateinfo(rnumber,tablename,action,update_date ) values(rownum,'demo', 'update',sysdate); elsif deleting then insert into updateinfo(rnumber,tablename,action,update_date ) values(rownum,'demo', 'delete',sysdate); end if; -- EXCEPTION -- WHEN OTHERS THEN -- Consider logging the error and then re-raise -- RAISE; END TRI_TABLE; but when checking updateinfo, all rnumber column is zero. is there anyway to retrieve the correct row number?

    Read the article

  • if exists, update, else insert new record

    - by I__
    i am inserting values into a table if the record exists already replace it, and if it does not exist then add a new one. so far i have this code: INSERT INTO table_name VALUES (value1, value2, value3,...) where pk="some_id"; but i need something like this if not pk="some_id" exists then INSERT INTO table_name VALUES (value1, value2, value3,...) where pk="some_id"; else update table_name where pk="some_id" what would be the correct SQL syntax for this? please note that i am using sql access and that i guess it can be a combination of vba and sql

    Read the article

  • SQL Query That Should Return Least two days record

    - by Aryans
    I have a table "abc" where i store timestamp having multiple records let suppose 1334034000 Date:10-April-2012 1334126289 Date:11-April-2012 1334291399 Date:13-April-2012 I want to build a sql query where I can find at first attempt the records having last two day values and so second time the next two days . . . Example: Select *,dayofmonth(FROM_UNIXTIME(i_created)) from notes where dayofmonth(FROM_UNIXTIME(i_created)) > dayofmonth(FROM_UNIXTIME(i_created)) -2 order by dayofmonth(FROM_UNIXTIME(i_created)) this query returns all the records date wise but we need very most two days record. Please suggest accordingly. Thanks in advance

    Read the article

  • MySQL: Selecting One Record When Others Have Same Data

    - by LoganFrederick
    I have a table of cities that all share the same area code: 367 01451 Harvard Worcester Massachusetts MA 978 Eastern 368 01452 Hubbardston Worcester Massachusetts MA 978 Eastern 369 01453 Leominster Worcester Massachusetts MA 978 Eastern The table has multiple area codes, all with multiple cities. What I'd like to do is only select one city from each area code and delete any extra cities from duplicate area codes. What would be the best query to accomplish this? I believe: http://stackoverflow.com/questions/596629/mysql4-sql-for-selecting-one-or-zero-record Is coming close to what I need but didn't quite get what/how those answers were working. Note The "978" row is the "area_code" row, table name is "zip_code".

    Read the article

  • GStreamer record iradio-mode artifacts

    - by Kanzeon
    I'm trying to record internet radio while listen it. I use the following line, but comes to my attention that when I set the iradio-mode true some noises comes in the recorded file, not in the playback. Without iradio-mode, all is ok. But in my app I need this mode to get the title message. gst-launch souphttpsrc location="<radio channel>" iradio-mode=true ! tee name=t ! queue ! decodebin2 ! audioconvert ! audioresample ! osxaudiosink t. ! queue ! filesink location=rectest.mp3

    Read the article

  • How to update a record with multiple keys

    - by OceanBlue
    I am trying a database app on Android. I want to use the SQLiteDatabase update(...) convenience method to update a record. Normally, for a WHERE clause of a single key this is working. Following code is working fine:- values.put("testname", "Quiz1"); mDB.update("Tests", values, "id=?", new String[]{"2"}); //this statement works However, I want to update a column in a table which has a combination of two keys as the unique identifier. I tried the following. This executes without exception, but nothing is updated. values.put("score", 60); mDB.update("Results", values, "studentid=? AND testid=?", new String[] { "2,1" }); // this statement does not work How to do it?

    Read the article

  • Record Name field in DNS responce

    - by Lescott
    I just read about DNS protocol, and found, that the name field can be writen in two ways: lenght of the next label the label lenght of the next label the label ... zero-byte pointer to the previous name field Next is the original article fragment: The Resource Record Name field is encoded in the same way as the Question Name field unless the name is already present elsewhere in the DNS message, in which case a 2-byte field is used in place of a length-value encoded name and acts as a pointer to the name that is already present. So, my question is, how can I determine the first or the second way is using in a package?

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >