Daily Archives

Articles indexed Friday March 26 2010

Page 2/121 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Missing audio and problems playing FLV video converted from 720p .mov file with FFMPEG

    - by undefined
    I have some .mov video files recorded from a JVC GC-FM1 HD video camera in 720p mode. I have FFMPEG running on a Linux box that I upload files to and have them encoded into FLV format. The video appears to be encoding ok but there is no audio in the resulting FLV file and when I play it back in Flash Player in a browser or on Adobe Media Player, the video pauses at the start. It appears that Adobe Media Player waits for the progress bar to reach the end of the video before starting the playback - i.e. the video will load, the picture pauses, the progress bar seeks to the end as if the video was playing then when it reaches the end the video picture starts. There is no audio on the video. I am noticing this in the video player I have built with Flash 8 using an FLVPlayback component and attached seekBar. The seek bar will start moving as if the video is playing but the picture remains paused. Here are some outputs from my FFMPEG log and the command I am using to encode the video - my FFMPEG command called from PHP - $cmd = 'ffmpeg -i ' . $sourcelocation.$filename.".".$fileext . ' -ab 96k -b 700k -ar 44100 -s ' . $target['width'] . 'x' . $target['height'] . ' -ac 1 -acodec libfaac ' . $destlocation.$filename.$ext_trans .' 2>&1'; and here is the output from my error log - FFmpeg version UNKNOWN, Copyright (c) 2000-2010 Fabrice Bellard, et al. built on Jan 22 2010 11:31:03 with gcc 4.1.2 20070925 (Red Hat 4.1.2-33) configuration: --prefix=/usr --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libvorbis --enable-libx264 libavutil 50. 7. 0 / 50. 7. 0 libavcodec 52.48. 0 / 52.48. 0 libavformat 52.47. 0 / 52.47. 0 libavdevice 52. 2. 0 / 52. 2. 0 libavfilter 1.17. 0 / 1.17. 0 libswscale 0. 9. 0 / 0. 9. 0 libpostproc 51. 2. 0 / 51. 2. 0 Seems stream 0 codec frame rate differs from container frame rate: 119.88 (120000/1001) -> 59.94 (60000/1001) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'uploads/video/60974_v1.mov': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt comment : JVC GC-FM1 comment-eng : JVC GC-FM1 Duration: 00:00:30.41, start: 0.000000, bitrate: 4158 kb/s Stream #0.0(eng): Video: h264, yuv420p, 640x480 [PAR 1:1 DAR 4:3], 4017 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s Output #0, rawvideo, to 'uploads/video/60974_v1.jpg': Stream #0.0(eng): Video: mjpeg, yuvj420p, 320x240 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 59.94 tbc Stream mapping: Stream #0.0 -> #0.0 Press [q] to stop encoding [h264 @ 0x8e67930]B picture before any references, skipping [h264 @ 0x8e67930]decode_slice_header error [h264 @ 0x8e67930]no frame! Error while decoding stream #0.0 [h264 @ 0x8e67930]B picture before any references, skipping [h264 @ 0x8e67930]decode_slice_header error [h264 @ 0x8e67930]no frame! Error while decoding stream #0.0 frame= 1 fps= 0 q=3.8 Lsize= 15kB time=0.02 bitrate=7271.4kbits/s dup=482 drop=0 video:15kB audio:0kB global headers:0kB muxing overhead 0.000000% Which are the important errors here - B picture before any references, skipping? decode_slice_header error? no frame? or Seems stream 0 codec frame rate differs from container frame rate: 119.88 (120000/1001) - 59.94 (60000/1001) Any advice welcome, thanks

    Read the article

  • How to get checked items in a WPF ListBox?

    - by Joan Venge
    I have a WPF ListBox where I have checkboxes, but what's the way to get the list of items that are checked? The ListBox is data binded to a Dictionary<T>. Here is the XAML: <Window x:Class="WpfApplication.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid Margin="10"> <ListBox ItemsSource="{DynamicResource Nodes}" Grid.IsSharedSizeScope="True" x:Name="MyList"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition SharedSizeGroup="Key" /> <ColumnDefinition SharedSizeGroup="Name" /> <ColumnDefinition SharedSizeGroup="Id" /> </Grid.ColumnDefinitions> <CheckBox Name="NodeItem" Click="OnItemChecked"> <StackPanel Orientation="Horizontal"> <TextBlock Margin="2" Text="{Binding Value.Name}" Grid.Column="1"/> <TextBlock Margin="2" Text="-" Grid.Column="2"/> <TextBlock Margin="2" Text="{Binding Value.Id}" Grid.Column="3"/> </StackPanel> </CheckBox> </Grid> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid> </Window>

    Read the article

  • How to create a folder in Eclipse?

    - by Polaris878
    Hi, I'd like to create a folder under a package in Eclipse... The purpose of this folder is merely for organizational purposes. Meaning, I don't want it to be another package. Every time I try to add a folder under a package, it just creates a package instead. I'd like to have the following structure: project/src/package1/someClass.java project/src/package1/someFOLDER/anotherClass.java project/src/package1/package2/anotherFOLDER/oneOtherClass.java Is it possible to do this without adding a package? I come from a .NET/C# and C++ background... here I'd just add a folder and the reference to that class would be updated in the project. How can I just add an organizational folder in eclipse? Thanks

    Read the article

  • flex combobox backspace or delete key does not delete highlighted text

    - by crazy horse
    Context: I am implementing a flex auto-suggest combobox - as the user types in each character: Consider the string 'Stackoverflow' and user input = 'st' 1) the data provider is filtered to show all items starting with 'st' 2) text is set to auto-suggest string such that the un-typed part is highlighted. So for instance, the combobox text may contain st'ackoverflow', where 'ackoverflow' is highlighted using setSelectedIndex() Issue: When I hit back-space or delete, and check the 'this.text' value, I expect that the last un-highlighted character ('t' in the above case) gets deleted and the data provider is filtered to show all items starting with 's'. However the text property contains 'st', as before Question: what am I missing? What else can I try out?

    Read the article

  • How do i change this method to get strings instead of ints

    - by David
    here is the original code: public static int getInt () { Scanner in = new Scanner (System.in) ; if (in.hasNextInt()) { int a = in.nextInt() ; return a ; } else { System.out.println ("try again:") ; return getInt () ; } } This checks and sees if the input it receives is an int. If it is then it returns the int, if not it tells you to try again and re-runs. This is what i tried to do to change it: public static String getIns () { Scanner in = new Scanner (System.in) ; if (in.hasNextString()) { String a = in.nextString() ; return a ; } else { System.out.println ("try again:") ; return getIns () ; } } This doesn't work though. I looked through the documentation for the scanner class and i think the problem is that there is no such method as in.hasNextString or in.nextString What methods from the scanner class can i use to do what i intend these to do?

    Read the article

  • Selecting all images in a <td> tag and disabling them

    - by Cen
    My HTML looks something like this: <table class="disabled"> <tr> <td> <input blah blah> </td> <td> <img id="reallyLongASP.NetID" etcetc/> </td> </tr> </table> In all with a class indicated as "disabled", I want to set visibility: hidden on the <img>. I can disable using the crazy id ASP.Net gives, but would like to do a general statement that affects every control in the <table> Thanks for the help in advance,

    Read the article

  • Installing mongrel service on Windows 2008

    - by akirekadu
    We use InstallAnywhere to install our product. One of the components that it needs to install is mongrel. IA invokes the following command line during installation: mongrel_rails service::install -N service-1 -D "Service 1" -c "C:\app_dir\\rails\rails_apps\service-1" -p 19000 -e production Apprently under the hoods "sc create..." is used. The installation works great on Windows 2003. On Windows 2008 though this operation requires elevated privileges. When I login as local administrator (ie 'local-machine\administrator' user), the installation works just fine. However, when I login as a domain user that is part of local administrators group, the services fails to install with error "access is denied". How can I make it possible to install the product without having to login as local administrator? Thanks! Couple of notes I would like to add. One solution I tried is to execute the installer as administrator. The service does get installed. However, it creates another problem. An embedded 3rd party product and its files get installed with admin only rights. So we do need to run the installer as logged in user.

    Read the article

  • IBM Informix using spatial datablade

    - by changed
    I need to use IBM Informix for my project where I have point coordinates and I need to find which points are present in query rectangular region. Informix has spatial datablade module with ST_POINT and ST_POLYGON data objects. I know how to create, insert and create r-tree index on tables with such objects. But problem is how to do a SELECT statement, something which list all the points in a particular rectangular region.

    Read the article

  • Aptana/Eclipse "Mark for Publishing feature"

    - by Mickey Cheong
    Hi, I was wondering whether Aptana or Eclipse has a plugin/feature that allows you to "Mark for Publishing" once you save the file. So, as you working on different files, you can just save it and it will be mark for publishing. Once you are done with the files, you can just click "Publish All" and it will upload to the FTP server that setup with the Project. I learnt about this great feature in Coda (Mac). I was wondering if there is one in Eclipse/Aptana. Else, if there any alternative. Cheers, Mickey

    Read the article

  • Recommendations for a Hex Viewer Control for Windows.Forms?

    - by Fred F.
    I need ability to display content in Hex View, like this from WinHex Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F 00000000 EF BB BF 0D 0A 4D 69 63 72 6F 73 6F 66 74 20 56 ..Microsoft V 00000010 69 73 75 61 6C 20 53 74 75 64 69 6F 20 53 6F 6C isual Studio Sol 00000020 75 74 69 6F 6E 20 46 69 6C 65 2C 20 46 6F 72 6D ution File, Form 00000030 61 74 20 56 65 72 73 69 6F 6E 20 31 30 2E 30 30 at Version 10.00 00000040 0D 0A 23 20 56 69 73 75 61 6C 20 53 74 75 64 69 ..# Visual Studi 00000050 6F 20 32 30 30 38 0D 0A 50 72 6F 6A 65 63 74 28 o 2008..Project( 00000060 22 7B 46 31 38 34 42 30 38 46 2D 43 38 31 43 2D "{F184B08F-C81C- 00000070 34 35 46 36 2D 41 35 37 46 2D 35 41 42 44 39 39 45F6-A57F-5ABD99 Please recommend a control. Thank you.

    Read the article

  • phing nested if conditions

    - by Matt1776
    Hello - I am having trouble understanding the Phing documentation regarding multiple conditions for a given tag. It implies you cannot have multiple conditions unless you use the tag, but there are no examples of how to use it. Consequently I nested two tags, however I feel silly doing this when I know there is a better way. Does anyone know how I can use the tag to accomplish the following: <if><equals arg1="${deployment.host.type}" arg2="unrestricted" /><then> <if><equals arg1="${db.adapter}" arg2="PDO_MYSQL"/><then> <!-- Code Here --> </then></if> </then></if>

    Read the article

  • How do you go from an abstract project description to actual code?

    - by Jason
    Maybe its because I've been coding around two semesters now, but the major stumbling block that I'm having at this point is converting the professor's project description and requirements to actual code. Since I'm currently in Algorithms 101, I basically do a bottom-up process, starting with a blank whiteboard and draw out the object and method interactions, then translate that into classes and code. But now the prof has tossed interfaces and abstract classes into the mix. Intellectually, I can recognize how they work, but am stubbing my toes figuring out how to use these new tools with the current project (simulating a web server). In my professors own words, mapping the abstract description to Java code is the real trick. So what steps are best used to go from English (or whatever your language is) to computer code? How do you decide where and when to create an interface, or use an abstract class?

    Read the article

  • SPP Socket createRfcommSocketToServiceRecord will not connect

    - by philDev
    Hello, I want to use Android 2.1 to connect to an external Bluetooth device, wich is offering an SPP port to me. In this case it is an external GPS unit. When I'm trying to connect I can't connect an established socket while being in the "client" mode. Then if I try to set up a socket (being in the server role), to RECEIVE text from my PC everything works just fine. The Computer can connect as the client to the Socket on the Phone via SPP using the SSP UUID or some random UUID. So the Problem is not that I'm using the wrong UUID. But the other way around (e.g. calling connect on the established client socket) createRfcommSocketToServiceRecord(UUID uuid)) just doesn't work. Sadly I don't have the time to inspect the problem further. It would be greate If somebody could point me the right way. In the following part of the Logfile has to be the Problem. Greets PhilDev P.S. I'm going to be present during the Office hours. Here the log file: 03-21 03:10:52.020: DEBUG/BluetoothSocket.cpp(4643): initSocketFromFdNative 03-21 03:10:52.025: DEBUG/BluetoothSocket(4643): connect 03-21 03:10:52.025: DEBUG/BluetoothSocket(4643): doSdp 03-21 03:10:52.050: DEBUG/ADAPTER(2132): create_device(01:00:00:7F:B5:B3) 03-21 03:10:52.050: DEBUG/ADAPTER(2132): adapter_create_device(01:00:00:7F:B5:B3) 03-21 03:10:52.055: DEBUG/DEVICE(2132): Creating device [address = 01:00:00:7F:B5:B3] /org/bluez/2132/hci0/dev_01_00_00_7F_B5_B3 [name = ] 03-21 03:10:52.055: DEBUG/DEVICE(2132): btd_device_ref(0x10c18): ref=1 03-21 03:10:52.065: INFO/BluetoothEventLoop.cpp(1914): event_filter: Received signal org.bluez.Adapter:DeviceCreated from /org/bluez/2132/hci0 03-21 03:10:52.065: INFO/BluetoothService.cpp(1914): ... Object Path = /org/bluez/2132/hci0/dev_01_00_00_7F_B5_B3 03-21 03:10:52.065: INFO/BluetoothService.cpp(1914): ... Pattern = 00001101-0000-1000-8000-00805f9b34fb, strlen = 36 03-21 03:10:52.070: DEBUG/DEVICE(2132): *************DiscoverServices******** 03-21 03:10:52.070: INFO/DTUN_HCID(2132): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0011) 03-21 03:10:52.070: INFO/DTUN_HCID(2132): bdaddr=01:00:00:7F:B5:B3 03-21 03:10:52.070: INFO/DTUN_CLNT(2132): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4) 03-21 03:10:52.070: INFO/(2106): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354 03-21 03:10:52.070: INFO/(2106): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134 03-21 03:10:52.075: ERROR/BTLD(2106): ****************search UUID = 1101*********** 03-21 03:10:52.075: INFO//system/bin/btld(2103): btapp_dm_GetRemoteServiceChannel() 03-21 03:10:52.120: DEBUG/BluetoothService(1914): updateDeviceServiceChannelCache(01:00:00:7F:B5:B3) 03-21 03:10:52.120: DEBUG/BluetoothEventLoop(1914): ClassValue: null for remote device: 01:00:00:7F:B5:B3 is null 03-21 03:10:52.120: INFO/BluetoothEventLoop.cpp(1914): event_filter: Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/2132/hci0 03-21 03:10:52.305: WARN/BTLD(2106): bta_dm_check_av:0 03-21 03:10:56.395: DEBUG/WifiService(1914): ACTION_BATTERY_CHANGED pluggedType: 2 03-21 03:10:57.440: WARN/BTLD(2106): SDP - Rcvd conn cnf with error: 0x4 CID 0x43 03-21 03:10:57.440: INFO/BTL-IFS(2106): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 13 pbytes (hdl 10) 03-21 03:10:57.445: INFO/DTUN_CLNT(2132): dtun-rx signal [DTUN_SIG_DM_RMT_SERVICE_CHANNEL] (id 42) len 15 03-21 03:10:57.445: INFO/DTUN_HCID(2132): dtun_dm_sig_rmt_service_channel: success=1, service=00000000 03-21 03:10:57.445: ERROR/DTUN_HCID(2132): discovery unsuccessful! package de.phil_dev.android.BT; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.UUID; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothServerSocket; import android.bluetooth.BluetoothSocket; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.widget.Toast; public class ThinBTClient extends Activity { private static final String TAG = "THINBTCLIENT"; private static final boolean D = true; private BluetoothAdapter mBluetoothAdapter = null; private BluetoothSocket btSocket = null; private BufferedInputStream inStream = null; private BluetoothServerSocket myServerSocket; private ConnectThread myConnection; private ServerThread myServer; // Well known SPP UUID (will *probably* map to // RFCOMM channel 1 (default) if not in use); // see comments in onResume(). private static final UUID MY_UUID = UUID .fromString("00001101-0000-1000-8000-00805F9B34FB"); // .fromString("94f39d29-7d6d-437d-973b-fba39e49d4ee"); // ==> hardcode your slaves MAC address here <== // PC // private static String address = "00:09:DD:50:86:A0"; // GPS private static String address = "00:0B:0D:8E:D4:33"; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if (D) Log.e(TAG, "+++ ON CREATE +++"); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); if (mBluetoothAdapter == null) { Toast.makeText(this, "Bluetooth is not available.", Toast.LENGTH_LONG).show(); finish(); return; } if (!mBluetoothAdapter.isEnabled()) { Toast.makeText(this, "Please enable your BT and re-run this program.", Toast.LENGTH_LONG).show(); finish(); return; } if (D) Log.e(TAG, "+++ DONE IN ON CREATE, GOT LOCAL BT ADAPTER +++"); } @Override public void onStart() { super.onStart(); if (D) Log.e(TAG, "++ ON START ++"); } @Override public void onResume() { super.onResume(); if (D) { Log.e(TAG, "+ ON RESUME +"); Log.e(TAG, "+ ABOUT TO ATTEMPT CLIENT CONNECT +"); } // Make the phone discoverable // When this returns, it will 'know' about the server, // via it's MAC address. // mBluetoothAdapter.startDiscovery(); BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address); Log.e(TAG, device.getName() + " connected"); // myServer = new ServerThread(); // myServer.start(); myConnection = new ConnectThread(device); myConnection.start(); } @Override public void onPause() { super.onPause(); if (D) Log.e(TAG, "- ON PAUSE -"); try { btSocket.close(); } catch (IOException e2) { Log.e(TAG, "ON PAUSE: Unable to close socket.", e2); } } @Override public void onStop() { super.onStop(); if (D) Log.e(TAG, "-- ON STOP --"); } @Override public void onDestroy() { super.onDestroy(); if (D) Log.e(TAG, "--- ON DESTROY ---"); } private class ServerThread extends Thread { private final BluetoothServerSocket myServSocket; public ServerThread() { BluetoothServerSocket tmp = null; // create listening socket try { tmp = mBluetoothAdapter .listenUsingRfcommWithServiceRecord( "myServer", MY_UUID); } catch (IOException e) { Log.e(TAG, "Server establishing failed"); } myServSocket = tmp; } public void run() { Log.e(TAG, "Beginn waiting for connection"); BluetoothSocket connectSocket = null; InputStream inStream = null; byte[] buffer = new byte[1024]; int bytes; while (true) { try { connectSocket = myServSocket.accept(); } catch (IOException e) { Log.e(TAG, "Connection failed"); break; } Log.e(TAG, "ALL THE WAY AROUND"); try { connectSocket = connectSocket.getRemoteDevice() .createRfcommSocketToServiceRecord(MY_UUID); connectSocket.connect(); } catch (IOException e1) { Log.e(TAG, "DIDNT WORK"); } // handle Connection try { inStream = connectSocket.getInputStream(); while (true) { try { bytes = inStream.read(buffer); Log.e(TAG, "Received: " + buffer.toString()); } catch (IOException e3) { Log.e(TAG, "disconnected"); break; } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); break; } } } void cancel() { } } private class ConnectThread extends Thread { private final BluetoothSocket mySocket; private final BluetoothDevice myDevice; public ConnectThread(BluetoothDevice device) { myDevice = device; BluetoothSocket tmp = null; try { tmp = device.createRfcommSocketToServiceRecord(MY_UUID); } catch (IOException e) { Log.e(TAG, "CONNECTION IN THREAD DIDNT WORK"); } mySocket = tmp; } public void run() { Log.e(TAG, "STARTING TO CONNECT THE SOCKET"); setName("My Connection Thread"); InputStream inStream = null; boolean run = false; //mBluetoothAdapter.cancelDiscovery(); try { mySocket.connect(); run = true; } catch (IOException e) { run = false; Log.e(TAG, this.getName() + ": CONN DIDNT WORK, Try closing socket"); try { mySocket.close(); } catch (IOException e1) { Log.e(TAG, this.getName() + ": COULD CLOSE SOCKET", e1); this.destroy(); } } synchronized (ThinBTClient.this) { myConnection = null; } byte[] buffer = new byte[1024]; int bytes; // handle Connection try { inStream = mySocket.getInputStream(); while (run) { try { bytes = inStream.read(buffer); Log.e(TAG, "Received: " + buffer.toString()); } catch (IOException e3) { Log.e(TAG, "disconnected"); } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } // starting connected thread (handling there in and output } public void cancel() { try { mySocket.close(); } catch (IOException e) { Log.e(TAG, this.getName() + " SOCKET NOT CLOSED"); } } } }

    Read the article

  • Map only certain parts of the class to a database using SQLAlchemy?

    - by Az
    When mapping an object using SQLAlchemy, is there a way to only map certain elements of a class to a database, or does it have to be a 1:1 mapping? Example: class User(object): def __init__(self, name, username, password, year_of_birth): self.name = name self.username = username self.password = password self.year_of_birth = year_of_birth Say, for whatever reason, I only wish to map the name, username and password to the database and leave out the year_of_birth. Is that possible and will this create problems? Edit - 25/03/2010 Additionally, say I want to map username and year_of_birth to a separate database. Will this database and the one above still be connected (via username)?

    Read the article

  • Detecting when an embedded Jetty server is fully initialized.

    - by Luke
    I have embedded Jetty in a java application and am calling the start() method on an instance of the Jetty server object (after setting a handler list which describes the location of the static and dynamic web content). Does the start() call block until initialization is complete? If not, how do I determine when the server is fully started and ready to receive requests?

    Read the article

  • Is there a way to efficiently update one value in dojo chart2d?

    - by Nick Orlowski
    I am looking for a way to update one and only one value in a dojox chart2d. There is a way to update an entire series, which involves mychart.updateSeries("myseriesname",array_of_data) mychart.render() but This is too slow for my application. What I want to do is be able to drag the mouse over a vertical bar chart and have the values change as I am doing it. Only one or two values will need to change, so there is no need to reload all of the plots, just the two or three values that are changing. Is there a method that will quickly update only one or two values without lag? Thanks, Nick O I may just end up writing my own css version :S

    Read the article

  • process tree

    - by Robert
    I'm looking for an easy way to find the process tree (as shown by tools like Process Explorer), in C# or other .Net language. It would also be useful to find the command-line arguments of another process (the StartInfo on System.Diagnostics.Process seems invalid for process other than the current process). I think these things can only be done by invoking the win32 api, but I'd be happy to be proved wrong. Thanks! Robert

    Read the article

  • Python regular expression implementation details

    - by Tom
    A question that I answered got me wondering: How are regular expressions implemented in Python? What sort of efficiency guarantees are there? Is the implementation "standard", or is it subject to change? I thought that regular expressions would be implemented as DFAs, and therefore were very efficient (requiring at most one scan of the input string). Laurence Gonsalves raised an interesting point that not all Python regular expressions are regular. (His example is r"(a+)b\1", which matches some number of a's, a b, and then the same number of a's as before). This clearly cannot be implemented with a DFA. So, to reiterate: what are the implementation details and guarantees of Python regular expressions? It would also be nice if someone could give some sort of explanation (in light of the implementation) as to why the regular expressions "cat|catdog" and "catdog|cat" lead to different search results in the string "catdog", as mentioned in the question that I referenced before.

    Read the article

  • Destructuring assignment in generator expressions and array comprehensions

    - by Eli Grey
    Why does for ([] in object); work fine but [void 0 for ([] in object)] or (void 0 for ([] in object)) throw a syntax error for invalid left-hand assignment? For example, I would expect the following code to work, but it doesn't (the assertion isn't even done due to the syntax error): let ( i = 0, arr = [1, 2, 3, 4], gen = (i for (i in arr) if (arr.hasOwnProperty(i)) ) { for ([] in gen) i++; console.assertEquals([void 0 for ([] in gen)].length, i); }

    Read the article

  • Alternative Input Device(Midi) doesn't prevent Screen Saver in Winforms application

    - by DTig
    I have developed a c# winforms application whereby the user is providing input via a midi connected device. The user will go for long periods without using the keyboard or mouse. When I receive a midi message is there anything I can do to "tell" the system that this counts as user activity (ie key press). I don't want the screen saver or time lockouts to occur, if they are actively using the midi device. I think my request is different than other requests I've seen because they want to disable screen savers for the life of their application whereby I just want midi input I receive to count as user interactivity. Is there something I can call when I receive midi input to signify to the system user activity?

    Read the article

  • How do I find the unix timestamp for the start of the next day in php?

    - by zeckdude
    I have a unix timestamp for the current time. I want to get the unix timestamp for the start of the next day. $current_timestamp = time(); $allowable_start_date = strtotime('+1 day', $current_timestamp); As I am doing it now, I am simply adding 1 whole entire day to the unix timestamp, when instead I would like to figure out how many seconds are left in this current day, and only add that many seconds in order to get the unix timestamp for the very first minute of the next day. What is the best way to go about this?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >