How do you find the current user in a Windows environment?
When running a command-line script, is it possible to get the name of the current user?
Join the discussion →When running a command-line script, is it possible to get the name of the current user?
Join the discussion →How do I, reliably, check in SQLite, whether a particular user table exists? I am not asking for unreliable ways like checking if a "select *" on the table returned an error or not (is this even a good idea?). The reason is like this: In my program, I need to create and then populate some tables if they do not exist already. If they do already exist, I need to update some tables. Should I take some other path instead to signal that the tables in question have already been created - say for example, by creating/putting/setting a certain flag in my program initialization/settings file on disk or
Join the discussion →I want to call (just display another applet)one applet from another applet . I just placed a button on my first applet and on its actionperformed method used the getcontextapplet() method. But second applet was not displayed. How can I display a second applet on any reaction of first... The code: import java.io.*; import java.applet.*; import java.awt.*; import java.awt.event.*; import java.sql.*; import javax.swing.*; public class home extends Applet implements ActionListener { Container c1; Label l1,l2,l3,l4; TextField t1; Button b1,b2; ImageIcon icon; Panel p1; URL order; public void init()
Join the discussion →I am looking for a library that does advanced math, statistics, statistical distribution, etc.. Currently I am looking for something that does binomial and poisson distribution.
Join the discussion →Is there any way in Java to guess the date format when it is not explicitly defined? For example a user types in 11Mar09 or 11-09-2009 or 11/09/2009 or 11-09 what is the best way of parsing this to a Date object without either a bunch of try catch or raising an error?
Join the discussion →Can I apply a CSS style to all headers from H1 to H6?
Join the discussion →When using the "label for" parameter on radio buttons, to be 508 compliant*, is the following correct? <label for="button one"><input type="radio" name="group1" id="r1" value="1" /> button one</label> or is this? <input type="radio" name="group1" id="r1" value="1" /><label for="button one"> button one</label> Reason I ask is that in the second example, "label" is only encompassing the text and not the actual radio button. *Section 508 of the Rehabilitation Act of 1973 requires federal agencies to provide software and website accessibility to people with disabilities.
Join the discussion →I'm trying to concatenate a string in a div with jQuery. Here is my code: var server = 'server name: ' $('#div').load('myservername.aspx'); I'd like to display: server name: myserver How can I best achieve this?
Join the discussion →Recently I am working with a hardware design group developing an ASIC. And I am drawing a lot of timing diagrams for which I am using Microsoft Excel, as it is easy to import into Word document. But, things are getting more and more difficult with Excel. What can be used to draw timing diagrams? Is there any easy tool out there?
Join the discussion →I have following code: <Window x:Class="WpfApplication1.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> <TextBox Text="{Binding Path=Name, Mode=OneWayToSource, UpdateSourceTrigger=Explicit, FallbackValue=default text}" KeyUp="TextBox_KeyUp" x:Name="textBox1"/> </Grid> public partial class Window1 : Window { public Window1() { InitializeComponent(); } private void TextBox_KeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { BindingExpression exp = this.t
Join the discussion →Where can I get a free code signing certificate for signing my applications? Ascertia used to give them out for free but apparently they don't anymore. Mine just expired and I'm looking to get another one? Any ideas?
Join the discussion →I have a CSV file on my server running PHP. If a user clicks on a link it should download, but instead it opens up in my browser window. My code looks as follows <a href="files/csv/example/example.csv"> Click here to download an example of the "CSV" file </a> It's a normal webserver where I have all of my development work on. I tried something like: <a href="files/csv/example/csv.php"> Click here to download an example of the "CSV" file </a> Now the contents of my csv.php file: header('Content-Type: application/csv'); header('Content-Disposition: attachment; filename=example.csv'); header('Pra
Join the discussion →How would I get awk to output the whole file name in ls -l if some of the files have spaces in them. Usually, I can run this command: ls -l | awk '{print $9}' That doesn't work if the files have spaces in them. Is it possible to print $9, $10, $11 etc as well somehow?
Join the discussion →I was just curious if anyone has heard of any sort of API for guitar tabs? The thought passed through my mind that it would be really neat if I could grab guitar tabs from the internet to bring into my C# app, but haven't been able to find anything. Thanks, Chris
Join the discussion →SQL Server 2008's new feature "SPARSE COLUMN" doesn't take any space if the column value is 0 (citation needed) or NULL, but when there is a value it takes 4 times the space a regular (non sparse) column holds. Why should I go for that at the time of database design? And if I should use that, in what situation will that be? Also how does no space get reserved when a column is defined as sparse, what is the internal implementation?
Join the discussion →How can I create an Access Database at runtime in C#?
Join the discussion →I'm wondering what's the actual difference between calling Thread.Sleep(1) and calling SwitchToThread() (if we ignore that it's currently not exposed by the BCL). Joe Duffy mentions in his post that: "The kernel32!SwitchToThread API doesn't exhibit the problems that Sleep(0) and Sleep(1) do." (regarding the scheduler's behavior) Why won't Sleep behave exactly like SwitchToThread? Why this differentiation exist, and for what is it good for? (if at all..)
Join the discussion →I can understand that many years ago there would be this kind of limitation, but nowadays surely this limit could easily be increased. We have naming conventions for objects, but there is always a case that turns up where we hit this limit - especially in naming foreign keys. Does anybody actually know why this isn't a bigger size - or is it bigger in 11g? Apparently the answer is that it will break currently scripts that aren't defensively coded. I say that is a very worrying thing, Oracle is trying to be the database, surely this is the kind of thing that you must constantly improve, otherwi
Join the discussion →Does anyone know of a linux-compatible command line html formatter? You know, something where I could pass it a file that looks like: <html> <body> <p> hi </p> </body> </html> And it gives me: <html> <body> <p> hi </p> </body> </html> I'm using PHP to generate this html, so if there is some handy way to do this via php that I'm missing?
Join the discussion →please let me know the issue with following script (sql,oracle 10g) 1 DECLARE @colname AS NVARCHAR(50) 2 DECLARE @tablename AS NVARCHAR(500) 3 DEClARE @query AS NVARCHAR(500) 4 SET @colname = 'select wk_units1 from cnt_sls_dm.fct_sales_summary' 5 SET @tablename = 'SELECT tablename from dmi_user.fct_sales_meta' 6 set @query='select '+@colname+' FROM '+@tablename+' 7* EXECUTE sp_executesql @query SQL> / ERROR: ORA-01756: quoted string not properly terminated
Join the discussion →Does anyone know of an extension for Firefox, or a script or some other mechanism, that can monitor one or more local files. Firefox would auto-refresh or otherwise update its canvas when it detected a change (of timestamp) in the files(s). For editing CSS, it would be ideal if just the CSS could be reloaded, rather than a full HTML re-render. Effectively it would enable similar behaviour to Firebug with its dynamic HTML/CSS editing, only through external files.
Join the discussion →Is there an equivalent of __DATE__ and __TIME__ in C#? Basically what I'm trying to do is place some build timestamping in a C# application. One possibility I saw on Microsoft's website was to do the following: Assembly assem = Assembly.GetExecutingAssembly(); Version vers = assem.GetName().Version; DateTime buildDate = new DateTime(2000, 1, 1).AddDays(vers.Build).AddSeconds(vers.Revision * 2); Console.WriteLine(vers.ToString()); Console.WriteLine(buildDate.ToString()); However, this only works if your version in AssemblyInfo.cs is "1.0..", which ours won't be.
Join the discussion →I was told that I need an 'SDK' to install something. What does that mean?
Join the discussion →How can I append a word to an already populated string variable str ? My variable has spaces, by the way.
Join the discussion →I'm working on a DSL in Microsoft's new M Grammar, and it needs to allow decimal values. I've defined decimal as token digits = "0".."9"; token spot = "."; token decimal = digits+ | digits+ spot digits+ | spot digits+; That seems to work, but is there a better way? It just feels like I'm missing something.
Join the discussion →I have C# .NET client on Windows and need to extract the start timecode and duration/length metadata from a .mov file. Anyone out there who knows how to do it?
Join the discussion →I need to make an XMLRPC request that has to be authenticated, and have found limited documentation on the authentication side of XMLRPC. What's the best way to go about this? Right now I'm using the code below but still getting an authentication failure. Is there a different way to specify the client, then call a secondary auth method? client = XMLRPC::Client.new(@xmlrpc_url, "/xmlrpc.php", "443", nil, nil, @username, @password, true, 900)
Join the discussion →Is it possible to use the break function to exit several nested for loops? If so, how would you go about doing this? Can you also control how many loops the break exits?
Join the discussion →I installed MOSS 2k7 Enterprise and now, I would like to use the Workflow feature. The problem is that : When I start any workflow, I have got the error "InfoPath Forms Services is not turned on" In Central Administrator -> Application Management -> InfoPath Forms Services, I tried to : (a)"Manageform templates" (b) "configure InfoPath Forms Services", "Upload form templates", but I always receive the same error "InfoPath Forms Services is not turned on" I tried to create an InfoPath file and publish in the SharePoint site but it does not work Do you have any idea ?
Join the discussion →I have two apps that use Integrated Security. One assigns Integrated Security = true in the connection string, and the other sets Integrated Security = SSPI. What is the difference between SSPI and true in the context of Integrated Security?
Join the discussion →